diff --git a/src/3_get_busybox.sh b/src/3_get_busybox.sh index 2c2dc6125..3abaa7fe7 100644 --- a/src/3_get_busybox.sh +++ b/src/3_get_busybox.sh @@ -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 ..