Updated Linux install script and manual files
[sgc2.git] / addons / Linux_install.sh
blob6b0c6a80fe528eb754cd68f4a5be78234073a157
1 #!/bin/bash
2 #
3 # Copy wordlists to SpeakGoodChinese preferences directory
4 ZENITY=`which zenity`
5 if [[ `/bin/uname` != "Darwin" ]] ; then
6 cd "`dirname "$0"`"
7 if [[ -s "~/Desktop/SpeakGoodChinese2" && -n ZENITY ]]; then
8 zenity --info --text="SpeakGoodChinese2 already exists at destination"
9 elif [[ -s "./SGC2/SpeakGoodChinese2_Linux64.zip" ]]; then
10 if [[ -d "~/Desktop" ]]; then
11 unzip ./SGC2/SpeakGoodChinese2_Linux64.zip -d ~/Desktop/
12 else
13 unzip ./SGC2/SpeakGoodChinese2_Linux64.zip -d ~/SpeakGoodChinese2
15 if [[ $? != 0 && -n ZENITY ]]; then
16 zenity --info --text='Installation of SpeakGoodChinese2 encountered an error'
17 fi
19 mkdir -p "~/.SpeakGoodChinese2/wordlists"
20 cp -r wordlists/* "~/.SpeakGoodChinese2/wordlists/"
21 if [[ $? != 0 && -n ZENITY ]]; then
22 zenity --info --text='Installation of the wordlists encountered an error'
23 elif [[ -n ZENITY ]]; then
24 zenity --info --text='Installation completed'
25 fi
26 elif [[ -n ZENITY ]]; then
27 zenity --info --text="THIS INSTALL SCRIPT IS ONLY FOR LINUX, NOT FOR MACINTOSH COMPUTERS (OSX)"
29 exit 0