diff --git a/scripts/makescript.sh b/scripts/makescript.sh index cf62191..919cffa 100755 --- a/scripts/makescript.sh +++ b/scripts/makescript.sh @@ -5,6 +5,7 @@ WAF=$(where waf) CARGO=$(where cargo) CMAKE=$(where cmake) MAKE=$(where make) +HUGO=$(where hugo) WAITMSG="Press any key to continue..." @@ -66,6 +67,28 @@ then return 0 fi +# look for hugo configuration +MAKEPATH=$(find-up "hugo.toml") +if [[ "$MAKEPATH" != "" ]] +then + echo "Found 'hugo.toml' file. Building website" + cd $MAKEPATH + $HUGO build -D + wait-for-keypress + return 0 +fi + +MAKEPATH=$(find-up "config/_default/hugo.toml") +if [[ "$MAKEPATH" != "" ]] +then + echo "Found 'hugo.toml' file. Building website" + cd $MAKEPATH + $HUGO build -D + wait-for-keypress + return 0 +fi + + echo "No matching makefiles found" wait-for-keypress return 1