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 . || {
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
if ! "$NO_GENERATION_CHECK"; then
|
||||
NEW_GENERATION=$(readlink /nix/var/nix/profiles/system | cut -d- -f2)
|
||||
echo "New generation is $NEW_GENERATION. Current is $CURRENT_GENERATION."
|
||||
if [ ! $NEW_GENERATION -gt $CURRENT_GENERATION ]; then
|
||||
echo "ERROR: New config was not added to bootloader. Exiting..."
|
||||
exit 1
|
||||
if ! "$NO_GENERATION_CHECK"; then
|
||||
NEW_GENERATION=$(readlink /nix/var/nix/profiles/system | cut -d- -f2)
|
||||
echo "New generation is $NEW_GENERATION. Current is $CURRENT_GENERATION."
|
||||
if [ ! $NEW_GENERATION -gt $CURRENT_GENERATION ]; then
|
||||
echo "ERROR: New config was not added to bootloader. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue