[vlc-commits] extras/tools: check for tar -J properly

Rafaël Carré git at videolan.org
Sat Nov 26 22:40:34 CET 2011


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Nov 26 16:39:44 2011 -0500| [9ce1ad72d1ef266841bd6976cb61a2a4bc1cf7c7] | committer: Rafaël Carré

extras/tools: check for tar -J properly

we don't use 'xz' binary directly

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ce1ad72d1ef266841bd6976cb61a2a4bc1cf7c7
---

 extras/tools/bootstrap |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/extras/tools/bootstrap b/extras/tools/bootstrap
index 56d1b78..1cea282 100755
--- a/extras/tools/bootstrap
+++ b/extras/tools/bootstrap
@@ -24,17 +24,20 @@ then
 	exit 1
 fi
 
+check_tar() {
+if ! tar PcJ /dev/null >/dev/null 2>&1
+then
+    echo "tar doesn't support xz (J option)"
+    NEEDED="$NEEDED .tar .xz"
+fi
+}
+
 check() {
 if ! $1 --version >/dev/null 2>&1
 then
     echo "$1 not found"
     NEEDED="$NEEDED .$1"
 else
-    if [ "$1" = "xz" ] && ! tar PcJ /dev/null >/dev/null
-    then
-        echo "tar doesn't support xz (J option)"
-        NEEDED="$NEEDED .tar"
-    fi
     # found, need to check version ?
     [ -z "$2" ] && return # no
     # we only check GNU tools, their version have the form MAJOR.MINOR
@@ -55,9 +58,9 @@ check autoconf 2.67
 check automake 1.11
 check libtool 2.2
 check pkg-config
-check xz
 check cmake
 check yasm
+check_tar
 
 [ -n "$NEEDED" ] && mkdir -p build/
 



More information about the vlc-commits mailing list