diff options
author | Franck Cuny <franck@fcuny.net> | 2023-12-04 08:11:58 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-12-04 08:11:58 -0800 |
commit | 86556478a7b95cebf3093ccaa5760f8a740e45ec (patch) | |
tree | c73ac1a3b72f14030db25c9faa0606c46d123917 /bin/update.sh | |
parent | add a CI configuration for this repo (diff) | |
download | world-86556478a7b95cebf3093ccaa5760f8a740e45ec.tar.gz |
clean up the build script
As suggested by shellcheck.
Diffstat (limited to 'bin/update.sh')
-rwxr-xr-x | bin/update.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/update.sh b/bin/update.sh index 1949525..1593716 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -1,22 +1,19 @@ #!/bin/sh -e -VERSION=1.0 - GREEN='\033[1;32m' -RED='\033[1;31m' CLEAR='\033[0m' export NIXPKGS_ALLOW_UNFREE=1 # Navigate to the directory of this script -cd $(dirname $(readlink -f $0)) +cd "$(dirname "$(readlink -f "$0")")" cd .. echo "${GREEN}Starting build...${CLEAR}" -nix --experimental-features 'nix-command flakes' build .#darwinConfigurations.$(hostname -s).system $@ +nix --experimental-features 'nix-command flakes' build .#darwinConfigurations."$(hostname -s)".system "$@" echo "${GREEN}Switching to new generation...${CLEAR}" -./result/sw/bin/darwin-rebuild switch --flake .# $@ +./result/sw/bin/darwin-rebuild switch --flake .# "$@" echo "${GREEN}Cleaning up...${CLEAR}" unlink ./result |