Dev script now supports non-nix systems

This commit is contained in:
Evangelos Lamprou 2023-10-18 00:11:04 +02:00
parent cae52014b9
commit 9abc4882fb

View File

@ -4,4 +4,9 @@ set -e
cd "$(dirname "$0")/../frontend"
nix run nixpkgs#elmPackages.elm-live -- src/Main.elm --start-page=index.html -- --debug --output=elm.js "$@"
if [[ -z $(command -v nix) ]] && [[ -z $(command -v elm-live) ]]; then
echo "Please install either 'nix' or 'elm-live'" && exit 1
fi
command -v nix && nix run nixpkgs#elmPackages.elm-live -- src/Main.elm --start-page=index.html -- --debug --output=elm.js "$@"
command -v elm-live && elm-live src/Main.elm --start-page=index.html -- --debug --output=elm.js "$@"