mirror of
https://github.com/iesfdlr/lab.git
synced 2026-06-06 01:16:49 +00:00
chore: make sure the commit id is different before updating
This commit is contained in:
10
update.sh
10
update.sh
@@ -3,6 +3,14 @@
|
||||
set -e
|
||||
|
||||
echo "Actualizando el sistema..."
|
||||
old_rev="$(git rev-parse HEAD)"
|
||||
git pull --rebase --autostash
|
||||
|
||||
nixos-rebuild switch --flake path:.#nixos
|
||||
new_rev="$(git rev-parse HEAD)"
|
||||
|
||||
if [ "$old_rev" != "$new_rev" ]; then
|
||||
echo "Hay cambios nuevos en el repositorio. Construyendo el sistema..."
|
||||
nixos-rebuild switch --flake path:.#nixos
|
||||
else
|
||||
echo "No hay cambios nuevos en el repositorio. Omitiendo nixos-rebuild."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user