diff --git a/src/1_get_kernel.sh b/src/1_get_kernel.sh index 4dd79f6b0..2b5c116d9 100644 --- a/src/1_get_kernel.sh +++ b/src/1_get_kernel.sh @@ -1,13 +1,24 @@ #!/bin/sh +# Grab everything after the '=' sign DOWNLOAD_URL=$(grep -i KERNEL_SOURCE_URL .config | cut -f2 -d'=') + +# Grab everything after the last '/' ARCHIVE_FILE=${DOWNLOAD_URL##*/} +cd source + +# Downloading kernel file +# -c option allows the download to resume +wget -c $DOWNLOAD_URL + +# Delete folder with previously extracted kernel +cd .. cd work -rm -f $ARCHIVE_FILE -wget $DOWNLOAD_URL rm -rf kernel mkdir kernel + +# Extract kernel to folder 'kernel' +# Full path will be something like, kernel\linux-3.16 tar -xvf $ARCHIVE_FILE -C kernel cd .. -