fix(packages/rebuild): fix generation check logic
This commit is contained in:
parent
42b3a92d9b
commit
66bc9f679d
1 changed files with 7 additions and 8 deletions
|
@ -91,14 +91,13 @@ pkgs.writeShellScriptBin "rebuild" # sh
|
||||||
nh os switch . || {
|
nh os switch . || {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
if ! "$NO_GENERATION_CHECK"; then
|
||||||
|
NEW_GENERATION=$(readlink /nix/var/nix/profiles/system | cut -d- -f2)
|
||||||
if ! "$NO_GENERATION_CHECK"; then
|
echo "New generation is $NEW_GENERATION. Current is $CURRENT_GENERATION."
|
||||||
NEW_GENERATION=$(readlink /nix/var/nix/profiles/system | cut -d- -f2)
|
if [ ! $NEW_GENERATION -gt $CURRENT_GENERATION ]; then
|
||||||
echo "New generation is $NEW_GENERATION. Current is $CURRENT_GENERATION."
|
echo "ERROR: New config was not added to bootloader. Exiting..."
|
||||||
if [ ! $NEW_GENERATION -gt $CURRENT_GENERATION ]; then
|
exit 1
|
||||||
echo "ERROR: New config was not added to bootloader. Exiting..."
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue