removed ; from if statements (??)
This commit is contained in:
parent
490c843d24
commit
7b006d33cc
|
@ -38,7 +38,8 @@ removepkg \
|
|||
zd1211-firmware \
|
||||
|
||||
# Add non-free packages to blacklist if not already blacklisted
|
||||
if ! grep -q "Non-free packages removed as per freenix.net" $BLACKLISTFILE; then
|
||||
if [ ! grep -q "Non-free packages removed as per freenix.net" $BLACKLISTFILE]
|
||||
then
|
||||
|
||||
# Comment out any to be excluded from blacklist
|
||||
echo "#" >> $BLACKLISTFILE
|
||||
|
@ -69,4 +70,5 @@ echo "% Non-free software is removed and blacklisted."
|
|||
echo "% To (re)build a libre kernel for your system, run: "
|
||||
echo "% ./linux-libre-kernel-builder-installer.sh"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -22,16 +22,16 @@ CWD0=$(pwd)
|
|||
RELEASE=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
|
||||
|
||||
# Uses mirrors.slackware.com to find a mirror near you, feel free to change to a local mirror
|
||||
REPOURL="https://mirrors.slackware.com"
|
||||
REPOURL='https://mirrors.slackware.com'
|
||||
|
||||
# prepare for kernel building
|
||||
BUILDDIR="/tmp/linux-libre-4-freenix"
|
||||
BUILDDIR='/tmp/linux-libre-4-freenix'
|
||||
|
||||
# Set blacklist file, just in case...
|
||||
BLACKLISTFILE="/etc/slackpkg/blacklist"
|
||||
BLACKLISTFILE='/etc/slackpkg/blacklist'
|
||||
|
||||
# Set variable to "yes" to install package after building:
|
||||
INSTALL_FIRMWARE="no"
|
||||
# Set variable to 'yes' to install package after building:
|
||||
INSTALL_FIRMWARE='no'
|
||||
|
||||
# download linux-libre firmware
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
@ -72,8 +72,8 @@ cp kernel-firmware.SlackBuild kernel-firmware-gnu.SlackBuild
|
|||
chmod a+x kernel-firmware-gnu.SlackBuild
|
||||
./kernel-firmware-gnu.SlackBuild
|
||||
|
||||
if [ $INSTALL_FIRMWARE == "yes" ]; then
|
||||
|
||||
if [ $INSTALL_FIRMWARE == 'yes' ]
|
||||
then
|
||||
# Remove stock firmware package
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Removing stock firmware package"
|
||||
|
@ -89,20 +89,22 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|||
installpkg /tmp/kernel-firmware-gnu*
|
||||
|
||||
# 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
|
||||
echo 'kernel-firmware' >> $BLACKLISTFILE
|
||||
|
||||
# Print out new blacklist
|
||||
cat $BLACKLISTFILE
|
||||
|
||||
# that should do it!
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Linux-libre firmware has been built and installed."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
|
||||
echo '% Linux-libre firmware has been built and installed.'
|
||||
echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
|
||||
cd ${CWD0}
|
||||
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -18,23 +18,23 @@
|
|||
CWD0=$(pwd)
|
||||
|
||||
# Set blacklist file, just in case...
|
||||
BLACKLISTFILE="/etc/slackpkg/blacklist"
|
||||
BLACKLISTFILE='/etc/slackpkg/blacklist'
|
||||
|
||||
# Set variable to "yes" to install packages after building:
|
||||
INSTALL_KERNEL="no"
|
||||
# Set variable to 'yes' to install packages after building:
|
||||
INSTALL_KERNEL='no'
|
||||
|
||||
# future proof the release version number
|
||||
# to-do: make this work on -current?
|
||||
RELEASE=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
|
||||
|
||||
# prepare for kernel building
|
||||
BUILDDIR="/tmp/linux-libre-4-freenix"
|
||||
BUILDDIR='/tmp/linux-libre-4-freenix'
|
||||
rm -r ${BUILDDIR}
|
||||
mkdir ${BUILDDIR}
|
||||
cd ${BUILDDIR}
|
||||
|
||||
# Uses mirrors.slackware.com to find a mirror near you, feel free to change to a local mirror
|
||||
REPOURL="https://mirrors.slackware.com"
|
||||
REPOURL='https://mirrors.slackware.com'
|
||||
# Set latest stock version here
|
||||
STOCKVERSION=$(wget -q -O - $REPOURL/slackware/slackware64-$RELEASE/patches/source/ | grep -o -P '(?<=>linux-).*(?=\/<)')
|
||||
|
||||
|
@ -113,7 +113,8 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|||
echo "% We're done with Pat's script. Thanks Pat!"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
if [ $INSTALL_KERNEL == "yes" ]; then
|
||||
if [ $INSTALL_KERNEL == 'yes' ]
|
||||
then
|
||||
# Upgrade kernel packages all at once
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Upgrading stock kernel packages to libre kernel packages."
|
||||
|
@ -128,7 +129,8 @@ geninitrd
|
|||
lilo
|
||||
|
||||
# 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
|
||||
|
@ -144,9 +146,6 @@ echo "kernel.*" >> $BLACKLISTFILE
|
|||
# Print out new blacklist
|
||||
cat $BLACKLISTFILE
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# that should do it!
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Stock kernel packages have been upgraded to libre kernel packages."
|
||||
|
@ -155,4 +154,18 @@ echo "% ./linux-libre-firmware-builder-installer.sh"
|
|||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
cd ${CWD0}
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# that should do it!
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Linux-libre kernel packages have been built."
|
||||
echo "% The last step is to build the firmware package, do this by running:"
|
||||
echo "% ./linux-libre-firmware-builder-installer.sh"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
cd ${CWD0}
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -23,12 +23,12 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Build and install Linux-libre kernel packages"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
INSTALL_KERNEL=yes ./linux-libre-kernel-builder-installer.sh
|
||||
INSTALL_KERNEL='yes' ./linux-libre-kernel-builder-installer.sh
|
||||
# Build and install linux-libre firmware package
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Build and install Linux-libre firmware package"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
INSTALL_FIRMWARE=yes ./linux-libre-firmware-builder-installer.sh
|
||||
INSTALL_FIRMWARE='yes' ./linux-libre-firmware-builder-installer.sh
|
||||
# Say goodbye...
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% You are now fully liberated, you can reboot the system."
|
||||
|
|
Loading…
Reference in New Issue