Source downloaded to new source folder

This commit is contained in:
BeresfordHare 2014-08-07 14:39:56 +12:00
parent d8954a701c
commit f902853da3

View File

@ -1,13 +1,23 @@
#/bin/sh
#!/bin/sh
# Grab everything after the '=' sign
DOWNLOAD_URL=$(grep -i BUSYBOX_SOURCE_URL .config | cut -f2 -d'=')
# Grab everything after the last '/'
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
cd work
rm -f $ARCHIVE_FILE
wget $DOWNLOAD_URL
rm -rf busybox
mkdir busybox
tar -xvf $ARCHIVE_FILE -C busybox
cd source
# Downloading busybox source
# -c option allows the download to resume
wget -c $DOWNLOAD_URL
# Delete folder with previously extracted busybox
rm -rf ../work/busybox
mkdir ../work/busybox
# Extract kernel to folder 'busybox'
# Full path will be something like, busybox\busybox-1.22.1
tar -xvf $ARCHIVE_FILE -C ../work/busybox
cd ..