From ae1fe74542858e21d1a605bd9ec1d021e5c9b418 Mon Sep 17 00:00:00 2001 From: su_v Date: Tue, 26 Aug 2014 15:59:46 +0200 Subject: osx-app.sh: test awk and require gawk if too old (bzr r13506.1.47) --- packaging/macosx/osx-app.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index 5bb2a5340..87e6391e1 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -180,6 +180,20 @@ if [ ! -e "$LIBPREFIX/lib/aspell-0.60/en.dat" ]; then exit 1 fi +# awk on Leopard fails in fixlib(), test earlier and require gawk if test fails +awk_test="$(echo "/lib" | awk -F/ '{for (i=1;i&2 + exit 1 + else + awk_cmd="$LIBPREFIX/bin/gawk" + fi +else + awk_cmd="awk" +fi +unset awk_test + # OS X version #---------------------------------------------------------- @@ -491,7 +505,7 @@ fixlib () { lib) # TODO: verfiy correct/expected install name for relocated libs to_id="$package/Contents/Resources$filePath/$1" - loader_to_res="$(echo $filePath | gawk -F/ '{for (i=1;i