[frogr] Added -nostrip parameter to makebundle.sh (avoid stripping debug symbols)
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Added -nostrip parameter to makebundle.sh (avoid stripping debug symbols)
- Date: Tue, 18 Dec 2012 20:50:15 +0000 (UTC)
commit a49dde1a268dd8c660b5a1293267a896cb7e16d6
Author: Mario Sanchez Prada <msanchez gnome org>
Date: Tue Dec 18 21:18:15 2012 +0100
Added -nostrip parameter to makebundle.sh (avoid stripping debug symbols)
macosx/makebundle.sh | 62 ++++++++++++++++++++++++++++++++-----------------
1 files changed, 40 insertions(+), 22 deletions(-)
---
diff --git a/macosx/makebundle.sh b/macosx/makebundle.sh
index 5d134c2..31ce0a1 100755
--- a/macosx/makebundle.sh
+++ b/macosx/makebundle.sh
@@ -2,17 +2,6 @@
# Copied and modified from GEdit
-if [ -d frogr.app ] && [ "$1x" = "-fx" ]; then
- rm -rf frogr.app
-fi
-
-if [ ! -d frogr.app ]; then
- echo "Creating new frogr.app bundle..."
- gtk-mac-bundler frogr.bundle
-else
- echo "Note frogr.app bundle already exists, only stripping it..."
-fi
-
function do_strip {
tp=$(file -b --mime-type "$1")
@@ -30,19 +19,48 @@ function do_strip {
chmod u+w "$1"
}
-echo "Strip debug symbols from bundle binaries"
-
-# Strip debug symbols
-for i in $(find -E frogr.app/Contents/Resources -type f -regex '.*\.(so|dylib)$'); do
- do_strip "$i"
+BUNDLE_APP=frogr.app
+FORCE_REMOVAL=false
+STRIP_DEBUG=true
+while [ $# -gt 0 ]; do
+ [ "$1x" = "-fx" ] && FORCE_REMOVAL=true
+ [ "$1x" = "-nostripx" ] && STRIP_DEBUG=false
+ shift 1
done
-if [ -d frogr.app/Contents/Resources/bin ]; then
- for i in $(find frogr.app/Contents/Resources/bin -type f); do
- if [ -x "$i" ]; then
- do_strip "$i"
- fi
+if [ -d $BUNDLE_APP ] && $FORCE_REMOVAL; then
+ echo "Removing old $BUNDLE_APP bundle..."
+ rm -rf $BUNDLE_APP
+fi
+
+if [ ! -d $BUNDLE_APP ]; then
+ echo "Creating new $BUNDLE_APP bundle..."
+ gtk-mac-bundler frogr.bundle
+elif $STRIP_DEBUG; then
+ echo "Note $BUNDLE_APP bundle already exists, only stripping it..."
+else
+ echo "Note $BUNDLE_APP bundle already exists. Nothing to do"
+fi
+
+if $STRIP_DEBUG; then
+ echo "Strip debug symbols from bundle binaries"
+
+ # Strip debug symbols in lib/
+ for i in $(find -E $BUNDLE_APP/Contents/Resources -type f -regex '.*\.(so|dylib)$'); do
+ do_strip "$i"
done
+
+ # Strip debug symbols bin/
+ if [ -d $BUNDLE_APP/Contents/Resources/bin ]; then
+ for i in $(find $BUNDLE_APP/Contents/Resources/bin -type f); do
+ if [ -x "$i" ]; then
+ do_strip "$i"
+ fi
+ done
+ fi
+
+ # Strip debug symbols in the main binary
+ do_strip $BUNDLE_APP/Contents/MacOS/frogr-bin
fi
-do_strip frogr.app/Contents/MacOS/frogr-bin
+echo "Bundled created in $BUNDLE_APP!"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]