diff options
author | Sean Allred <code@seanallred.com> | 2015-01-04 14:04:55 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-04 14:04:55 -0500 |
commit | 89834aa61adf1fff29379c82ab96629f0b2960d0 (patch) | |
tree | 5f1791c4048816ada270ece0027e4eb8800a27d1 /bot/sx-bot.sh | |
parent | ba9dfba28bd879c49009187bcbbc60fbb343c65b (diff) | |
parent | a9dfed758f2ef75081606228fdff87ad9c6f6ddb (diff) |
Merge pull request #189 from vermiculus/tag-bot
Tag bot
Diffstat (limited to 'bot/sx-bot.sh')
-rwxr-xr-x | bot/sx-bot.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/bot/sx-bot.sh b/bot/sx-bot.sh new file mode 100755 index 0000000..6a5df17 --- /dev/null +++ b/bot/sx-bot.sh @@ -0,0 +1,36 @@ +#!/usr/bin/bash + +DESTINATION_BRANCH=gh-pages + +function notify-done { + local title + local message + title="SX Tag Bot" + message="Finished retrieving tag lists" + case $(uname | tr '[[:upper:]]' '[[:lower:]]') in + darwin) + terminal-notifier \ + -message ${message} \ + -title ${title} \ + -sound default + ;; + *) + echo ${message} + esac +} + +function generate-tags { + emacs -Q --batch \ + -L "./" -L "./bot/" -l sx-bot \ + -f sx-bot-fetch-and-write-tags + ret = $? + notify-done + return ${ret} +} + +git branch ${DESTINATION_BRANCH} && + git pull && + generate-tags && + git stage data/ && + git commit -m "Update tag data" && + echo 'Ready for "git push"' |