Created
July 7, 2009 06:05
-
-
Save cellfusion/141918 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/bash | |
readonly FLA_NAME='Adobe Flash' | |
readonly APP_DIR='/Applications/' | |
readonly CREATE_FILENAME='CreateProject_' | |
readonly UPDATE_FILENAME='UpdateProject_' | |
CMDNAME='progression $0' | |
FLA_VER='CS4' | |
# CS3 もしくは CS4 があるか確認(後で) | |
FLG_CS4=`ls $APP_DIR"Adobe Flash CS4"` | |
FLG_CS3=`ls $APP_DIR"Adobe Flash CS3"` | |
if [ FLG_CS4 ]; then | |
INSTALL_FLA_VER='CS4' | |
elif [ FLG_CS3 ]; then | |
INSTALL_FLA_VER='CS3' | |
else | |
echo "Flash IDE が見つかりません" 1>&2 | |
fi | |
API_DIR="/Users/cellfusion/Library/Application Support/Adobe/Flash $INSTALL_FLA_VER/ja/Configuration/Progression/Resources/API Examples/" | |
Execute() | |
{ | |
case $CMD in | |
"create" ) JSFL_FILE=${CREATE_FILENAME}${FLA_VER}'.jsfl' ;; | |
"update" ) JSFL_FILE=${UPDATE_FILENAME}${FLA_VER}'.jsfl' ;; | |
* ) echo "Usage: $CMDNAME (create|update)" 1>&2 ;; | |
esac | |
FLA_APP_FILENAME=${FLA_NAME}" "${INSTALL_FLA_VER} | |
cd "$API_DIR" | |
open -a "$FLA_APP_FILENAME" "$JSFL_FILE" | |
return 0 | |
} | |
if [ $# -ne 1 ]; then | |
echo "Usage: $CMDNAME (create|update)" 1>&2 | |
fi | |
CMD=$1 | |
Execute | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment