From 2eaee597c9f93d6ce2b8ea97caa71bfaa8dd5a1e Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 3 Aug 2013 16:37:28 -0500 Subject: [PATCH] Fix creating symlinks in make-macosx-app.sh Create symlink if arch name is found anywhere in info printed by file command, not only if arch name is the last word. --- make-macosx-app.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/make-macosx-app.sh b/make-macosx-app.sh index 4ed57d61..7768964a 100755 --- a/make-macosx-app.sh +++ b/make-macosx-app.sh @@ -75,11 +75,11 @@ function symlinkArch() pushd "${DSTPATH}" > /dev/null - IS32=`file "${SRCFILE}.${EXT}" | grep "i386" | awk '{print $NF}'` - IS64=`file "${SRCFILE}.${EXT}" | grep "x86_64" | awk '{print $NF}'` - ISPPC=`file "${SRCFILE}.${EXT}" | grep "ppc" | awk '{print $NF}'` + IS32=`file "${SRCFILE}.${EXT}" | grep "i386"` + IS64=`file "${SRCFILE}.${EXT}" | grep "x86_64"` + ISPPC=`file "${SRCFILE}.${EXT}" | grep "ppc"` - if [ "${IS32}" == "i386" ]; then + if [ "${IS32}" != "" ]; then if [ ! -L "${DSTFILE}x86.${EXT}" ]; then ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86.${EXT}" fi @@ -87,7 +87,7 @@ function symlinkArch() rm "${DSTFILE}x86.${EXT}" fi - if [ "${IS64}" == "x86_64" ]; then + if [ "${IS64}" != "" ]; then if [ ! -L "${DSTFILE}x86_64.${EXT}" ]; then ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86_64.${EXT}" fi @@ -95,7 +95,7 @@ function symlinkArch() rm "${DSTFILE}x86_64.${EXT}" fi - if [ "${ISPPC}" == "ppc" ]; then + if [ "${ISPPC}" != "" ]; then if [ ! -L "${DSTFILE}ppc.${EXT}" ]; then ln -s "${SRCFILE}.${EXT}" "${DSTFILE}ppc.${EXT}" fi