nested if

This commit is contained in:
shelldweller 2023-06-08 12:34:57 -05:00
parent 4fea40ff2f
commit 77cd312ca2
2 changed files with 4 additions and 6 deletions

View File

@ -88,10 +88,8 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
installpkg /tmp/kernel-firmware-gnu*
fi
# Add non-free packages to blacklist if not already blacklisted
if ! grep -q "kernel-firmware" $BLACKLISTFILE; then
if ! grep -q "kernel-firmware" $BLACKLISTFILE; then
# Blacklist stock firmware package
echo "kernel-firmware" >> $BLACKLISTFILE
@ -105,6 +103,7 @@ echo "% Linux-libre firmware has been built and installed."
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
cd ${CWD0}
fi
fi
# that should do it!

View File

@ -126,10 +126,8 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
geninitrd
lilo
fi
# Add non-free packages to blacklist if not already blacklisted
if ! grep -q "Kernel packages removed to prevent stock kernel being reinstalled" $BLACKLISTFILE; then
if ! grep -q "Kernel packages removed to prevent stock kernel being reinstalled" $BLACKLISTFILE; then
# Blacklist stock kernel packages
echo "#" >> $BLACKLISTFILE
@ -145,6 +143,7 @@ echo "kernel.*" >> $BLACKLISTFILE
# Print out new blacklist
cat $BLACKLISTFILE
fi
fi
# that should do it!