瀏覽代碼

Fixed detection of GNU date so it works on Linux

Carlos Bautista 12 年之前
父節點
當前提交
7c9d9c655f
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      bb.sh

+ 4 - 2
bb.sh

@@ -307,7 +307,8 @@ create_html_page() {
     fi
 
     echo '</div>' >> "$filename" # content
-    echo ${filename%.*.*}
+
+    # Add disqus commments except for index and all_posts pages
     if [[ ${filename%.*.*} !=  "index" && ${filename%.*.*} != "all_posts" ]]; then
     	disqus_body >> "$filename"
     fi
@@ -663,7 +664,8 @@ reset() {
 }
 
 date_version_detect() {
-	if !(date --version >/dev/null 2>&1)  ; then
+	date --version >/dev/null 2>&1
+	if [ $? -ne 0 ];  then
 		# date utility is BSD. Test if gdate is installed 
 		if gdate --version >/dev/null 2>&1 ; then
                    DATE_COMMAND=gdate