The downloads now go into a source folder

This commit is contained in:
BeresfordHare 2014-08-07 14:31:33 +12:00
parent dcac27166f
commit c76f64e0b0

View File

@ -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 ..