Fixed detection of GNU date so it works on Linux

This commit is contained in:
Carlos Bautista 2013-04-09 17:09:23 +02:00
parent 2ca8e59bd0
commit 7c9d9c655f
1 changed files with 4 additions and 2 deletions

6
bb.sh
View File

@ -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