瀏覽代碼

Some bugfixes

Carlos Fenollosa 12 年之前
父節點
當前提交
0878f6ccc3
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      bb.sh

+ 8 - 1
bb.sh

@@ -60,6 +60,7 @@
 #
 #########################################################################################
 #
+# 1.5.1    Misc bugfixes and parameter checks
 # 1.5      Durad Radojicic refactored some code and added flexibility and i18n
 # 1.4.2    Now issues are handled at Github
 # 1.4.1    Some code refactoring
@@ -88,7 +89,7 @@ global_variables() {
     # If you want to fork the project please contact me first, I wouldn't mind opening a git
     # or some shared code base and collaborate with other people.
     global_software_name="BashBlog"
-    global_software_version="1.5"
+    global_software_version="1.5.1"
 
     # Blog title
     global_title="My fancy blog"
@@ -606,6 +607,12 @@ reset() {
 do_main() {
     global_variables
 
+    # Check for $EDITOR
+    if [[ -z "$EDITOR" ]]; then
+        echo "Please set your \$EDITOR environment variable"
+        exit
+    fi
+
     # Check for validity of argument
     if [ "$1" != "reset" ] && [ "$1" != "post" ] && [ "$1" != "rebuild" ] && [ "$1" != "list" ] && [ "$1" != "edit" ]; then 
         usage; exit;