From 03e013464428ff740ccafa1487030b594a3b096b Mon Sep 17 00:00:00 2001 From: Dave Kennedy Date: Tue, 26 Jan 2016 15:49:29 -0700 Subject: [PATCH 1/3] Fixed #3 --- mkstage4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkstage4.sh b/mkstage4.sh index 4245a91..ac78a9a 100755 --- a/mkstage4.sh +++ b/mkstage4.sh @@ -92,7 +92,7 @@ EXCLUDES="\ if [ "$TARGET" == "/" ] then - EXCLUDES+=" --exclude=$STAGE4_FILENAME" + EXCLUDES+=" --exclude=${STAGE4_FILENAME#/}" fi if [ ${EXCLUDE_CONNMAN} -eq 1 ] From c3b036fbd245e974871e429eed0b32832c754485 Mon Sep 17 00:00:00 2001 From: Dave Kennedy Date: Tue, 26 Jan 2016 16:15:40 -0700 Subject: [PATCH 2/3] Fixed #2 and alphabetized paths --- mkstage4.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mkstage4.sh b/mkstage4.sh index ac78a9a..c05e494 100755 --- a/mkstage4.sh +++ b/mkstage4.sh @@ -79,16 +79,19 @@ shift;OPTIONS="$@" # Excludes: EXCLUDES="\ +--exclude=.bash_history \ +--exclude=dev/* \ +--exclude=lost+found \ +--exclude=media/* \ +--exclude=mnt/*/* \ --exclude=proc/* \ +--exclude=run/* \ --exclude=sys/* \ --exclude=tmp/* \ ---exclude=mnt/*/* \ +--exclude=usr/portage/* \ --exclude=var/lock/* \ --exclude=var/log/* \ ---exclude=var/run/* \ ---exclude=.bash_history \ ---exclude=lost+found \ ---exclude=usr/portage/*" +--exclude=var/run/*" if [ "$TARGET" == "/" ] then From 4fd4a61ad5386e6b4db12794531da4d9c8763546 Mon Sep 17 00:00:00 2001 From: Dave Kennedy Date: Tue, 26 Jan 2016 16:16:58 -0700 Subject: [PATCH 3/3] Only one of these checks is necessary --- mkstage4.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mkstage4.sh b/mkstage4.sh index c05e494..6b37ef5 100755 --- a/mkstage4.sh +++ b/mkstage4.sh @@ -66,8 +66,7 @@ then fi # determines if filename was given with relative or absolute path -if [ "`echo $ARCHIVE | grep -c '\/'`" -gt "0" ] && \ -[ "`echo $ARCHIVE | grep -c '^\/'`" -gt "0" ] +if [ "`echo $ARCHIVE | grep -c '^\/'`" -gt "0" ] then STAGE4_FILENAME="${ARCHIVE}.tar.bz2" else