Last active
August 29, 2015 14:07
-
-
Save ryoe/6ae75d73f36925c314fd to your computer and use it in GitHub Desktop.
A little shell script to help develop/debug hubot scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set the hubot slack credentials | |
export PORT=8181 | |
export HUBOT_SLACK_BOTNAME="hubot" | |
export HUBOT_SLACK_TEAM="nerdbeers" | |
export HUBOT_SLACK_TOKEN="my-slack-token" | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | |
set -e | |
dev() { | |
printf "Starting Hubot in 'DEV' mode...\n" | |
printf "you must issue commands to devbot on command line. For example:\n" | |
printf "devbot> devbot jira help\n\n" | |
bin/hubot --name devbot | |
printf "\n" | |
} | |
start() { | |
printf "Starting Hubot...\n\n" | |
bin/hubot --adapter slack | |
echo "." | |
} | |
case "$1" in | |
dev) | |
dev | |
;; | |
start) | |
start | |
;; | |
;; | |
update) | |
update "$2" | |
;; | |
*) | |
echo $"Usage: $0 {dev|start}" | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run against the shell with:
> sudo ./hubot-slack dev
run connected to slack:
> sudo ./hubot-slack start