aboutsummaryrefslogtreecommitdiff
path: root/support/dependencies/check-host-xzcat.sh
diff options
context:
space:
mode:
Diffstat (limited to 'support/dependencies/check-host-xzcat.sh')
-rwxr-xr-xsupport/dependencies/check-host-xzcat.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/support/dependencies/check-host-xzcat.sh b/support/dependencies/check-host-xzcat.sh
new file mode 100755
index 0000000000..10f1c4562a
--- /dev/null
+++ b/support/dependencies/check-host-xzcat.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+candidate="$1"
+
+xzcat=`which $candidate 2>/dev/null`
+if [ ! -x "$xzcat" ]; then
+ xzcat=`which xzcat 2>/dev/null`
+ if [ ! -x "$xzcat" ]; then
+ # echo nothing: no suitable xzcat found
+ exit 1
+ fi
+fi
+
+echo $xzcat