Commit 9ce1ad72 authored by Rafaël Carré's avatar Rafaël Carré

extras/tools: check for tar -J properly

we don't use 'xz' binary directly
parent cb1111bc
...@@ -24,17 +24,20 @@ then ...@@ -24,17 +24,20 @@ then
exit 1 exit 1
fi 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() { check() {
if ! $1 --version >/dev/null 2>&1 if ! $1 --version >/dev/null 2>&1
then then
echo "$1 not found" echo "$1 not found"
NEEDED="$NEEDED .$1" NEEDED="$NEEDED .$1"
else 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 ? # found, need to check version ?
[ -z "$2" ] && return # no [ -z "$2" ] && return # no
# we only check GNU tools, their version have the form MAJOR.MINOR # we only check GNU tools, their version have the form MAJOR.MINOR
...@@ -55,9 +58,9 @@ check autoconf 2.67 ...@@ -55,9 +58,9 @@ check autoconf 2.67
check automake 1.11 check automake 1.11
check libtool 2.2 check libtool 2.2
check pkg-config check pkg-config
check xz
check cmake check cmake
check yasm check yasm
check_tar
[ -n "$NEEDED" ] && mkdir -p build/ [ -n "$NEEDED" ] && mkdir -p build/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment