From 92cb1f48c50e95cd2acb1e981fedea72c3c51f23 Mon Sep 17 00:00:00 2001 From: "kebler.net" Date: Sun, 1 May 2022 13:34:53 -0700 Subject: [PATCH] fix: run creates the files directory if it doesn't exist. .example files can be run --- run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run b/run index cac46d2..957c964 100755 --- a/run +++ b/run @@ -3,7 +3,7 @@ RDIR=$(cd $(dirname $(readlink -f "$0")) >/dev/null 2>&1 ; pwd -P) # source any environment for particular site shopt -s extglob -ENV_FILE=$(ls $RDIR/sites/${1}* 2> /dev/null | grep -v '.off$\|.example$\|.tmpl$\|.template$') +ENV_FILE=$(ls $RDIR/sites/${1}* 2> /dev/null | grep -v '.off$\|.tmpl$\|.template$') if [[ $ENV_FILE ]]; then source $ENV_FILE @@ -20,6 +20,8 @@ HUGO=${HUGO:-$(command -v hugo)} PORT=${PORT:-8096} echo site files in $DATA_DIR listening on port $PORT # [[ $(netstat -tulpn | grep LISTEN | grep 0.0.0.0:$PORT) ]] && echo tcp port $PORT is busy can not start hugo server && exit +mkdir -p $DATA_DIR +# start hugo in the data directory (needed for git module) cd $DATA_DIR ls -la CMD="$HUGO server