Created
September 8, 2015 00:18
-
-
Save prenagha/404284fee1b8ff86aec5 to your computer and use it in GitHub Desktop.
Compile .applescript files to .scpt files. Useful for LaunchBar actions and such.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# find all launchbar action .applescript scripts and compile them | |
# | |
LBDEV=~/Dev/launchbar | |
find $LBDEV -type f -name '*.applescript' -print0 | while read -d '' -r APPLESCRIPT | |
do | |
echo "Compiling $APPLESCRIPT ..." | |
SCPT="${APPLESCRIPT%.applescript}.scpt" | |
/usr/bin/osacompile -o "$SCPT" "$APPLESCRIPT" | |
if [ $? -ne 0 ] | |
then | |
"Error compiling $APPLESCRIPT" 1>&2 | |
exit $? | |
fi | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment