Updated Linux install script and manual files
[sgc2.git] / addons / Mac_install.command
blobe731d1c559d72d0931a59e69414eb7fa27fd1547
1 #!/bin/bash
2 #
3 # Copy wordlists to SpeakGoodChinese preferences directory
4 if [[ `uname` == "Darwin" ]] ; then
5 cd "`dirname "$0"`"
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 ./SGC2/SpeakGoodChinese2_Mac.app.zip ]]; then
9 unzip ./SGC2/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/SpeakGoodChinese2/wordlists
15 cp -r wordlists/* ~/Library/Preferences/SpeakGoodChinese2/wordlists/
16 if [[ $? == 0 ]]; then
17 osascript -e 'tell app "Finder" to display dialog "Installation completed"'
18 else
19 osascript -e 'tell app "Finder" to display dialog "Installation of wordlists encountered an error"'
21 else
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'
25 exit 0