Ver código fonte

Fixed detection of GNU date so it works on Linux

Carlos Bautista 12 anos atrás
pai
commit
7c9d9c655f
1 arquivos alterados com 4 adições e 2 exclusões
  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