From f97c84c2d4a0a8ef6e53333a0a5c528397ccaded Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 8 Dec 2014 12:27:31 +0000 Subject: Move the script to a subdir,. So it's not caught by Melpa --- bot/sx-bot.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bot/sx-bot.sh (limited to 'bot/sx-bot.sh') diff --git a/bot/sx-bot.sh b/bot/sx-bot.sh new file mode 100755 index 0000000..176e454 --- /dev/null +++ b/bot/sx-bot.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +git branch gh-pages && + git pull && + emacs -Q --batch -L "./" -l sx-bot -f sx-bot-fetch-and-write-tags && + git commit . && + git push && + echo SUCCESS -- cgit v1.2.3 From 0604c4c7cf0dfd567e514d4bf7a9a28aa9af680f Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Fri, 2 Jan 2015 22:13:24 -0500 Subject: Load bot --- bot/sx-bot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/sx-bot.sh') diff --git a/bot/sx-bot.sh b/bot/sx-bot.sh index 176e454..76001af 100755 --- a/bot/sx-bot.sh +++ b/bot/sx-bot.sh @@ -2,7 +2,7 @@ git branch gh-pages && git pull && - emacs -Q --batch -L "./" -l sx-bot -f sx-bot-fetch-and-write-tags && + emacs -Q --batch -L "./" -L "./bot/" -l sx-bot -f sx-bot-fetch-and-write-tags && git commit . && git push && echo SUCCESS -- cgit v1.2.3 From acb2f6061799d671969927d9bdc5f4107e3f1680 Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Fri, 2 Jan 2015 22:53:38 -0500 Subject: Update sx-bot.sh Send a notifcation when tags have finished. Function `notify-done' can be extended for other operating systems. For example, I believe Red Hat has `notify-send'. --- bot/sx-bot.sh | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'bot/sx-bot.sh') diff --git a/bot/sx-bot.sh b/bot/sx-bot.sh index 76001af..6a5df17 100755 --- a/bot/sx-bot.sh +++ b/bot/sx-bot.sh @@ -1,8 +1,36 @@ #!/usr/bin/bash -git branch gh-pages && +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 && - emacs -Q --batch -L "./" -L "./bot/" -l sx-bot -f sx-bot-fetch-and-write-tags && - git commit . && - git push && - echo SUCCESS + generate-tags && + git stage data/ && + git commit -m "Update tag data" && + echo 'Ready for "git push"' -- cgit v1.2.3