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'=') DOWNLOAD_URL=$(grep -i BUSYBOX_SOURCE_URL .config | cut -f2 -d'=')
# Grab everything after the last '/'
ARCHIVE_FILE=${DOWNLOAD_URL##*/} ARCHIVE_FILE=${DOWNLOAD_URL##*/}
cd work cd source
rm -f $ARCHIVE_FILE
wget $DOWNLOAD_URL # Downloading busybox source
rm -rf busybox # -c option allows the download to resume
mkdir busybox wget -c $DOWNLOAD_URL
tar -xvf $ARCHIVE_FILE -C busybox
# 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 .. cd ..