Updated comment

This commit is contained in:
dbroqua 2019-06-22 13:34:31 +02:00
parent 25546630ac
commit f8ebc9b8bb

View File

@ -5,26 +5,21 @@ DEFAULT='\033[0m'
PREFIX='linux-' PREFIX='linux-'
EXTENSION='.tar.xz' EXTENSION='.tar.xz'
# Get last kernel version
# Connaitre le dernier kernel existant
INFO=`curl -Ls https://www.kernel.org/ | perl -lne 'BEGIN{$/=""} print "$1 $2" if \ INFO=`curl -Ls https://www.kernel.org/ | perl -lne 'BEGIN{$/=""} print "$1 $2" if \
/latest_link.*?<a.*?href=\"(.*?)\".*?>(.*?)</s'` /latest_link.*?<a.*?href=\"(.*?)\".*?>(.*?)</s'`
KERNEL=`echo ${INFO} | cut -d' ' -f 2` KERNEL=`echo ${INFO} | cut -d' ' -f 2`
URL=`echo ${INFO} | cut -d' ' -f 1` URL=`echo ${INFO} | cut -d' ' -f 1`
FILE=`echo ${URL}|rev|cut -d'/' -f 1 | rev` FILE=`echo ${URL}|rev|cut -d'/' -f 1 | rev`
#echo $KERNEL :: $URL :: $EXTENSION # Make directory in /usr/src/
#exit
# On créé un dossier du style /usr/src/5.1.9
DIR="/usr/src/${KERNEL}" DIR="/usr/src/${KERNEL}"
mkdir "${DIR}" mkdir "${DIR}"
# Go to build dir # Go to build dir
cd "${DIR}" || exit cd "${DIR}" || exit
# On télécharge l'archive dans le dossier # Get kernel archive
wget ${URL} wget ${URL}
# Extract kernel archive # Extract kernel archive