Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene / Dae committed Feb 10, 2015
1 parent 5edc7a6 commit 7768055
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.app
*.app
*.zip
15 changes: 10 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 7768055

Please sign in to comment.