From 8ffdfa6dae22578249a24591ce4c1bb9f8a5c632 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 22 May 2020 20:36:14 +0000 Subject: [PATCH] cleanup run.sh --- run.sh | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 run.sh diff --git a/run.sh b/run.sh deleted file mode 100755 index 3f5276a..0000000 --- a/run.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -WATCH="${HUGO_WATCH:=false}" -SLEEP="${HUGO_REFRESH_TIME:=-1}" -HUGO_DESTINATION="${HUGO_DESTINATION:=/output}" -echo "HUGO_WATCH:" $WATCH -echo "HUGO_REFRESH_TIME:" $HUGO_REFRESH_TIME -echo "HUGO_THEME:" $HUGO_THEME -echo "HUGO_BASEURL" $HUGO_BASEURL -echo "ARGS" $@ - -HUGO=/usr/local/sbin/hugo -echo "Hugo path: $HUGO" - -while [ true ] -do - if [[ $HUGO_WATCH != 'false' ]]; then - echo "Watching..." - $HUGO server --watch=true --source="/src" --theme="$HUGO_THEME" --destination="$HUGO_DESTINATION" --baseURL="$HUGO_BASEURL" --port=443 --bind="0.0.0.0" "$@" || exit 1 - else - echo "Building one time..." - $HUGO --source="/src" --theme="$HUGO_THEME" --destination="$HUGO_DESTINATION" --baseURL="$HUGO_BASEURL" "$@" || exit 1 - fi - - if [[ $HUGO_REFRESH_TIME == -1 ]]; then - exit 0 - fi - echo "Sleeping for $HUGO_REFRESH_TIME seconds..." - sleep $SLEEP -done