You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env bash
|
|
|
|
SCRIPT_DIR=`dirname "$0"`
|
|
|
|
if command -v nix-shell &> /dev/null; then
|
|
|
|
# If in NixOS use shell.nix
|
|
|
|
nix-shell --pure $SCRIPT_DIR/shell.nix --run "cd $SCRIPT_DIR && hugo"
|
|
|
|
else
|
|
|
|
# Otherwise use global hugo
|
|
|
|
DIR=$PWD
|
|
|
|
cd $SCRIPT_DIR
|
|
|
|
hugo
|
|
|
|
cd $DIR
|
|
|
|
fi
|