85 lines
2.2 KiB
Diff
85 lines
2.2 KiB
Diff
diff --git a/test/run-test.sh b/test/run-test.sh
|
|
index 9b3c91c..73c0d3e 100644
|
|
--- a/test/run-test.sh
|
|
+++ b/test/run-test.sh
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/bash
|
|
+#!/bin/sh
|
|
# fontconfig/test/run-test.sh
|
|
#
|
|
# Copyright © 2000 Keith Packard
|
|
@@ -84,11 +84,11 @@ fstat() {
|
|
ret=$(stat -c "$fmt" "$fn")
|
|
else
|
|
# BSD
|
|
- if [ "x$fmt" == "x%Y" ]; then
|
|
+ if [ "x$fmt" = "x%Y" ]; then
|
|
ret=$(stat -f "%m" "$fn")
|
|
- elif [ "x$fmt" == "x%y" ]; then
|
|
+ elif [ "x$fmt" = "x%y" ]; then
|
|
ret=$(stat -f "%Sm" -t "%F %T %z" "$fn")
|
|
- elif [ "x$fmt" == "x%n %s %y %z" ]; then
|
|
+ elif [ "x$fmt" = "x%n %s %y %z" ]; then
|
|
ret=$(stat -f "%SN %z %Sm %Sc" -t "%F %T %z" "$fn")
|
|
else
|
|
echo "E: Unknown format"
|
|
diff --git a/test/run-test-map.sh b/test/run-test-map.sh
|
|
index 869d7b2..c634bb8 100755
|
|
--- a/test/run-test-map.sh
|
|
+++ b/test/run-test-map.sh
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/bash
|
|
+#!/bin/sh
|
|
# fontconfig/test/run-test-cache-map.sh
|
|
#
|
|
# Copyright © 2018 Keith Packard
|
|
@@ -41,9 +41,8 @@ EXPECTED="out-map.expected"
|
|
FCLIST=../fc-list/fc-list$EXEEXT
|
|
FCCACHE=../fc-cache/fc-cache$EXEEXT
|
|
|
|
-which bwrap > /dev/null 2>&1
|
|
-if [ $? -eq 0 ]; then
|
|
- BWRAP=`which bwrap`
|
|
+if command -v bwrap > /dev/null 2>&1; then
|
|
+ BWRAP=$(command -v bwrap)
|
|
fi
|
|
|
|
FONT1=$TESTDIR/4x6.pcf
|
|
diff --git a/test/wrapper-script.sh b/test/wrapper-script.sh
|
|
index 94dcb85..ae68c6d 100755
|
|
--- a/test/wrapper-script.sh
|
|
+++ b/test/wrapper-script.sh
|
|
@@ -1,20 +1,24 @@
|
|
-#! /bin/bash
|
|
+#! /bin/sh
|
|
|
|
CC=${CC:-gcc}
|
|
|
|
case "$1" in
|
|
*.exe)
|
|
export WINEPATH=$(${CC} -print-sysroot)/mingw/bin
|
|
- fccwd=`pwd`
|
|
- cd $(IFS=:;for i in $PATH; do echo $i|grep mingw> /dev/null; [ $? -eq 0 ] && echo $i; done)
|
|
- if [ "x$(dirname $@)" = "x." ]; then
|
|
- /usr/bin/env wine $fccwd/$@
|
|
+ fccwd=$(pwd)
|
|
+ mingw_path=$(IFS=:; for i in $PATH; do
|
|
+ case "$i" in
|
|
+ *mingw*) printf '%s\n' "$i"; break ;;
|
|
+ esac
|
|
+ done)
|
|
+ cd "$mingw_path" || exit 1
|
|
+ if [ "$(dirname -- "$1")" = "." ]; then
|
|
+ /usr/bin/env wine "$fccwd/$1"
|
|
else
|
|
- /usr/bin/env wine $@
|
|
+ /usr/bin/env wine "$@"
|
|
fi
|
|
;;
|
|
*)
|
|
- $@
|
|
+ "$@"
|
|
;;
|
|
esac
|
|
-
|