17 current 2024-09-14 22:23:56 24.11.20240828.71e91c4 6.6.47 *
This commit is contained in:
parent
172782db18
commit
61b213a278
16
rebuild.sh
16
rebuild.sh
@ -12,6 +12,20 @@
|
||||
# A rebuild script that commits on a successful build
|
||||
set -e
|
||||
|
||||
PACKAGES_FLAG="-p"
|
||||
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "$PACKAGES_FLAG" ]]; then
|
||||
nix-channel --update
|
||||
UPDATE_PACKAGES=true
|
||||
else
|
||||
UPDATE_PACKAGES=false
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
# Edit your config
|
||||
#$EDITOR configuration.nix
|
||||
|
||||
@ -19,7 +33,7 @@ set -e
|
||||
#pushd ~/dotfiles/nixos/
|
||||
|
||||
# Early return if no changes were detected (thanks @singiamtel!)
|
||||
if git diff --quiet '*.nix'; then
|
||||
if git diff --quiet '*.nix' && [ "$UPDATE_PACKAGES" = "false" ]; then
|
||||
echo "No changes detected, exiting."
|
||||
#popd
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user