Check for Limechat Theme path #3

Merged
merged 1 commit into from Sep 13, 2012
Jump to file
+13 −1
Split
View
@@ -4,10 +4,22 @@ cd "$(dirname "$0")"
echo "Updating Repo..."
git pull
+git_pull_exit_status=$?
+if [ $git_pull_exit_status -ne 0 ]
+then
+ echo "git pull Failed"
+ exit $git_pull_exit_status
+fi
function doIt() {
echo "Copying theme files..."
- rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "readme.md" -av . ~/Library/Application\ Support/net.limechat.LimeChat-AppStore/Themes
+ limechat_theme_directory="${HOME}/Library/Application Support/net.limechat.LimeChat-AppStore/Themes"
+ if [ ! -d "$limechat_theme_directory" ]
+ then
+ # if not installed from AppStore
+ limechat_theme_directory="${HOME}/Library/Application Support/LimeChat/Themes"
+ fi
+ rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "readme.md" -av . "$limechat_theme_directory"
echo "Wookielight theme successfully installed!"
}