chore: make sure the commit id is different before updating

This commit is contained in:
2026-03-21 22:08:22 +01:00
parent a9a1700f52
commit 4aa24eef51

View File

@@ -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