Some fixes
This commit is contained in:
parent
362c9355b7
commit
2f106d0d08
1 changed files with 15 additions and 5 deletions
20
pkgkernel.sh
20
pkgkernel.sh
|
@ -3,16 +3,26 @@
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
DEFAULT='\033[0m'
|
DEFAULT='\033[0m'
|
||||||
EXTENSION='.tar.xz'
|
EXTENSION='.tar.xz'
|
||||||
KERNEL=`echo ${1}|cut -d"-" -f 2`
|
KERNEL=$(echo ${1}|cut -d"-" -f 2)
|
||||||
|
|
||||||
# Get kernel version from argument
|
# Get kernel version from argument
|
||||||
KERNEL=${KERNEL%$EXTENSION}
|
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
|
# Extract kernel archive
|
||||||
tar xavf ${1}
|
tar xavf "${1}"
|
||||||
|
|
||||||
# Enter kernel directory
|
# Enter kernel directory
|
||||||
cd linux-${KERNEL}
|
cd "linux-${KERNEL}" || exit
|
||||||
|
|
||||||
# Get old config
|
# Get old config
|
||||||
make olddefconfig
|
make olddefconfig
|
||||||
|
@ -31,6 +41,6 @@ make bindeb-pkg -j"$(nproc)" LOCALVERSION=-"$(dpkg --print-architecture)" KDEB_P
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Install new packages
|
# Install new packages
|
||||||
dpkg -i *${KERNEL}*.deb
|
dpkg -i ./*${KERNEL}*.deb
|
||||||
|
|
||||||
echo -e "${GREEN} ALL DONE!\n"
|
echo -e "${GREEN} ALL DONE!\n"
|
||||||
|
|
Loading…
Reference in a new issue