Gen 315: moved function defs from zshell.nix, now defined as shell binaries in scripts/default.nix
This commit is contained in:
18
glasshouse-desktop/home/scripts/scripts/nixcommit.sh
Executable file
18
glasshouse-desktop/home/scripts/scripts/nixcommit.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
s_check && (aplay ~/sound/sys/nixswitch-start.wav > /dev/null 2>&1 &)
|
||||
builtin cd "$HOME/sysflakes" || exit
|
||||
nix flake update
|
||||
|
||||
gen=$(readlink /nix/var/nix/profiles/system | sed 's/.*system-\([0-9]*\)-link/\1/')
|
||||
gen=$((gen + 1))
|
||||
|
||||
git diff --quiet
|
||||
if mycmd; then
|
||||
echo "Nothing to commit"
|
||||
return
|
||||
fi
|
||||
git add .
|
||||
git commit -m "Gen $gen: $@"
|
||||
git push
|
||||
builtin cd - || exit
|
||||
Reference in New Issue
Block a user