[PATCH 2/2] tar -> $TAR_APPLICATION

Steffen Moeller moeller at debian.org
Thu Mar 19 16:31:34 UTC 2009


And a new installation of GNU tar will have that variable reset
to /usr/local/bin/tar
---
 install.sh |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/install.sh b/install.sh
index 896accc..0b627a5 100755
--- a/install.sh
+++ b/install.sh
@@ -113,6 +113,7 @@ DOSFSTOOLS_PACKAGE=$INST_MIRROR/pool/main/d/dosfstools/dosfstools_3.0.1-1_armel.
 
 # FSO-MS5 busybox's tar does not support -z
 TAR_PACKAGE=$INST_MIRROR/pool/main/t/tar/tar_1.20-1_armel.deb
+TAR_APPLICATION=tar
 
 
 #
@@ -474,8 +475,8 @@ action_testing () {
 		fi
 	done
 
-	if tar --help 2>&1 | grep "Usage: tar \-\[cxtvO\]" >/dev/null; then
-		echo "W: tar does not support gzip archives"
+	if $TAR_APPLICATION --help 2>&1 | grep "Usage: $TAR_APPLICATION \-\[cxtvO\]" >/dev/null; then
+		echo "W: $TAR_APPLICATION does not support gzip archives"
 		echo "Downloading tar package"
 		wget $TAR_PACKAGE -O /tmp/tar.deb
 		cwd=`pwd`
@@ -489,6 +490,7 @@ action_testing () {
 		ar -x tar.deb data.tar.gz
 		mkdir -p /usr/local
 		gunzip -c data.tar.gz | tar -x -C /usr/local/
+		TAR_APPLICATION=/usr/local/bin/tar
 		rm -f data.tar.gz
 		rm -f tar.deb
 		cd "$cwd"
@@ -502,7 +504,7 @@ action_testing () {
 			echo "Downloading dosfstools package"
 			wget $DOSFSTOOLS_PACKAGE -O /tmp/dosfstools.deb
 			( cd /tmp && ar -x dosfstools.deb data.tar.gz )
-			tar -xz -C / -f /tmp/data.tar.gz
+			$TAR_APPLICATION -xz -C / -f /tmp/data.tar.gz
 			rm -f /tmp/data.tar.gz
 			rm -f /tmp/dosfstools.deb
 		fi
@@ -742,7 +744,7 @@ action_debian () {
 	echo " * Downloading cdebootstrap package"
 	wget $CDEBOOTSTRAP_PACKAGE -O /tmp/cdebootstrap.deb
 	( cd /tmp && ar -x cdebootstrap.deb data.tar.gz )
-	tar -xz -C / -f /tmp/data.tar.gz
+	$TAR_APPLICATION -xz -C / -f /tmp/data.tar.gz
 	rm -f /tmp/data.tar.gz
 	rm -f /tmp/cdebootstrap.deb
 
-- 
1.6.2.1


--------------070904030008000308040809--



More information about the pkg-fso-maint mailing list