Some fixes

This commit is contained in:
dbroqua 2018-10-22 09:50:57 +02:00
parent 362c9355b7
commit 2f106d0d08

View File

@ -3,16 +3,26 @@
GREEN='\033[0;32m'
DEFAULT='\033[0m'
EXTENSION='.tar.xz'
KERNEL=`echo ${1}|cut -d"-" -f 2`
KERNEL=$(echo ${1}|cut -d"-" -f 2)
# Get kernel version from argument
KERNEL=${KERNEL%$EXTENSION}
DIR="/usr/src/${KERNEL}"
# Create dedicated folder
mkdir "${DIR}"
# Move archive to build directory
mv "${1}" "${DIR}"
# Go to build dir
cd "${DIR}" || exit
# Extract kernel archive
tar xavf ${1}
tar xavf "${1}"
# Enter kernel directory
cd linux-${KERNEL}
cd "linux-${KERNEL}" || exit
# Get old config
make olddefconfig
@ -31,6 +41,6 @@ make bindeb-pkg -j"$(nproc)" LOCALVERSION=-"$(dpkg --print-architecture)" KDEB_P
cd ..
# Install new packages
dpkg -i *${KERNEL}*.deb
dpkg -i ./*${KERNEL}*.deb
echo -e "${GREEN} ALL DONE!\n"