test-lib: on FreeBSD, look for unzip(1) in /usr/local/bin/
Eric Wong reported that while FreeBSD has a /usr/bin/unzip, it uses different semantics from those that are needed by Git's tests: When passing the -a option to Info-Zip, it heeds the text attribute of the .zip file's central directory, while FreeBSD's unzip ignores that attribute. The common work-around is to install Info-Zip on FreeBSD, into /usr/local/bin/. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 21, 2016 at 18:02 UTC
d98b2c5fce0ae4ee3fbe34037798460d59e28432
1 file changed
+3
-1
t/test-lib.sh
+3
-1
@@ -966,7 +966,8 @@ yes () {
966
}
967
968
# Fix some commands on Windows
969
-case $(uname -s) in
969
+uname_s=$(uname -s)
970
+case $uname_s in
971
*MINGW*)
972
# Windows has its own (incompatible) sort and find
973
sort () {
@@ -1141,6 +1142,7 @@ test_lazy_prereq SANITY '
1142
return $status
1143
'
1144
1145
+test FreeBSD != $uname_s || GIT_UNZIP=${GIT_UNZIP:-/usr/local/bin/unzip}
1146
GIT_UNZIP=${GIT_UNZIP:-unzip}
1147
test_lazy_prereq UNZIP '
1148
"$GIT_UNZIP" -v