3 # Copy wordlists to SpeakGoodChinese preferences directory
4 if [[ `uname` == "Darwin" ]] ; then
6 if [[ -d ~
/Desktop
/SpeakGoodChinese2.app
]]; then
7 osascript
-e 'tell app "Finder" to display dialog "SpeakGoodChinese2.app already exists at destination"'
8 elif [[ -s .
/SGC
2/SpeakGoodChinese2_Mac.app.
zip ]]; then
9 unzip .
/SGC
2/SpeakGoodChinese2_Mac.app.
zip -d ~
/Desktop
/
10 if [[ $?
!= 0 ]]; then
11 osascript
-e 'tell app "Finder" to display dialog "Installation of SpeakGoodChinese2.app encountered an error"'
14 mkdir
-p ~
/Library
/Preferences
/SpeakGoodChinese
2/wordlists
15 cp -r wordlists
/* ~
/Library
/Preferences
/SpeakGoodChinese
2/wordlists
/
16 if [[ $?
== 0 ]]; then
17 osascript
-e 'tell app "Finder" to display dialog "Installation completed"'
19 osascript
-e 'tell app "Finder" to display dialog "Installation of wordlists encountered an error"'
22 osascript
-e 'tell app "Finder" to display dialog "THIS INSTALL SCRIPT IS ONLY FOR MACINTOSH COMPUTERS (OSX)"'
24 osascript
-e 'tell application "Terminal" to quit'