diff deploy/osx/paths.sh @ 1304:6e47bd2263e2 piper

Merge from branch project-file-rework
author Chris Cannam
date Fri, 28 Oct 2016 15:19:12 +0100
parents 2d48532a074b
children
line wrap: on
line diff
--- a/deploy/osx/paths.sh	Tue Oct 25 11:02:03 2016 +0100
+++ b/deploy/osx/paths.sh	Fri Oct 28 15:19:12 2016 +0100
@@ -30,24 +30,29 @@
 done
 
 for fwk in $frameworks; do
-        find "$app.app" -type f -print | while read x; do
-                current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
-                [ -z "$current" ] && continue
-                echo "$x has $current"
-                relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
-                        -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
-                echo "replacing with relative path $relative"
-                install_name_tool -change "$current" "@loader_path/$relative" "$x"
-        done
+    find "$app.app" -type f -print | while read x; do
+	if [ -x "$x" ]; then
+            current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
+            [ -z "$current" ] && continue
+            echo "$x has $current"
+            relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
+				       -e 's,[^/]*/,../,g' \
+				       -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
+            echo "replacing with relative path $relative"
+            install_name_tool -change "$current" "@loader_path/$relative" "$x"
+	fi
+    done
 done
 
 find "$app.app" -type f -print | while read x; do
-    qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }')
-    if [ -n "$qtdep" ]; then
-	echo
-	echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:"
-	echo $qtdep
-	exit 1
+    if [ -x "$x" ]; then
+	qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }')
+	if [ -n "$qtdep" ]; then
+	    echo
+	    echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:"
+	    echo $qtdep
+	    exit 1
+	fi
     fi
 done