Permalink
Browse files

Check for Limechat Theme path

If Limechat is not installed from AppStore, theme directory is set as
~/Library/Application\ Support/LimeChat/Themes/

And if git pull returns with non zero exit code, fail gracefully
  • Loading branch information...
1 parent 48e13a5 commit fd470862a484682d3a152fd2827bde68a1da8623 @infynyxx committed Sep 7, 2012
Showing with 13 additions and 1 deletion.
  1. +13 −1 bootstrap.sh
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!"
}

0 comments on commit fd47086

Please sign in to comment.