From 77680555d4950242176ec2424d8a90889318f3ab Mon Sep 17 00:00:00 2001 From: Eugene / Dae Date: Tue, 10 Feb 2015 19:47:09 +0300 Subject: [PATCH] Update build script --- .gitignore | 3 ++- build.sh | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7234299..7385395 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*.app \ No newline at end of file +*.app +*.zip \ No newline at end of file diff --git a/build.sh b/build.sh index 1ccc8b6..18c14c3 100755 --- a/build.sh +++ b/build.sh @@ -1,15 +1,20 @@ #!/bin/bash APP_NAME="Force Paste.app" +INFO_PLIST="$APP_NAME/Contents/Info.plist" rm -rf "$APP_NAME" osacompile -o "$APP_NAME" -x "main.scpt" -/usr/libexec/PlistBuddy -c "Add NSUIElement String 1" "$APP_NAME/Contents/Info.plist" -/usr/libexec/PlistBuddy -c "Set CFBundleIconFile icon" "$APP_NAME/Contents/Info.plist" -/usr/libexec/PlistBuddy -c "Add CFBundleVersion String 101" "$APP_NAME/Contents/Info.plist" -/usr/libexec/PlistBuddy -c "Add CFBundleShortVersionString String 1.0.1" "$APP_NAME/Contents/Info.plist" +/usr/libexec/PlistBuddy -c "Add NSUIElement String 1" "$INFO_PLIST" +/usr/libexec/PlistBuddy -c "Set CFBundleIconFile icon" "$INFO_PLIST" +/usr/libexec/PlistBuddy -c "Add CFBundleVersion String 101" "$INFO_PLIST" +/usr/libexec/PlistBuddy -c "Add CFBundleShortVersionString String 1.0.1" "$INFO_PLIST" +/usr/libexec/PlistBuddy -c "Add NSHumanReadableCopyright String '© 2015 https://github.com/EugeneDae/Force-Paste/'" "$INFO_PLIST" rm -f "$APP_NAME/Contents/Resources/applet.icns" cp "icon.icns" "$APP_NAME/Contents/Resources/" -rm -r "Force-Paste.zip" +if [ -f "Force-Paste.zip" ]; then + rm -r "Force-Paste.zip" +fi + zip -r "Force-Paste.zip" "Force Paste.app" \ No newline at end of file