From f902853da38af240d118016bf67803410871ce0e Mon Sep 17 00:00:00 2001 From: BeresfordHare Date: Thu, 7 Aug 2014 14:39:56 +1200 Subject: [PATCH] Source downloaded to new source folder --- src/3_get_busybox.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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 ..