Skip to content

Commit 774fc26

Browse files
agudulinzkat
authored andcommitted
install.sh: print out tar version when the flag is supported (#154)
not all the tar implementations support --version flag e.g. the one used in openbsd doesn't, so the installation process fails PR-URL: #154 Credit: @agudulin Reviewed-By: @zkat
1 parent cf09fba commit 774fc26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ fi
9898

9999
if [ $ret -eq 0 ] && [ -x "$tar" ]; then
100100
echo "tar=$tar"
101-
echo "version:"
102-
$tar --version
101+
if [ $tar --version > /dev/null 2>&1 ]; then
102+
echo "version:"
103+
$tar --version
104+
fi
103105
ret=$?
104106
fi
105107

0 commit comments

Comments
 (0)