Add make path for hugo sites
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user