diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-13 22:47:39 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-13 22:47:39 +0000 |
commit | 5ce5fa599e5221815d07a68a7acf8085071b2bf1 (patch) | |
tree | f9942e56385f6fa7d98934c1ab68794495836f41 /include | |
parent | a31256f139c5bb22378f12ad4a996cc073b18bdb (diff) | |
download | upstream-5ce5fa599e5221815d07a68a7acf8085071b2bf1.tar.gz upstream-5ce5fa599e5221815d07a68a7acf8085071b2bf1.tar.bz2 upstream-5ce5fa599e5221815d07a68a7acf8085071b2bf1.zip |
fix tar detection
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5061 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/host.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/host.mk b/include/host.mk index 3a5fd9683e..11522184b7 100644 --- a/include/host.mk +++ b/include/host.mk @@ -22,10 +22,11 @@ $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk echo "HOST_OS:=$$HOST_OS" > $@; \ echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \ echo "GNU_HOST_NAME:=$$GNU_HOST_NAME" >> $@; \ - if tar --version 2>&1 | grep 'GNU' >/dev/null; then \ + TAR=`which gtar`; \ + [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar`; \ + echo "TAR:=$$TAR" >> $@; \ + if $$TAR --version 2>&1 | grep 'GNU' >/dev/null; then \ echo "TAR_WILDCARDS:=--wildcards" >> $@; \ fi; \ - TAR=`which gtar tar | head -n 1`; \ - echo "TAR:=$$TAR" >> $@; \ ) |