Skip to content

Instantly share code, notes, and snippets.

@ryoe
Last active August 29, 2015 14:07
Show Gist options
  • Save ryoe/6ae75d73f36925c314fd to your computer and use it in GitHub Desktop.
Save ryoe/6ae75d73f36925c314fd to your computer and use it in GitHub Desktop.
A little shell script to help develop/debug hubot scripts.
#!/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
@ryoe
Copy link
Author

ryoe commented Oct 16, 2014

run against the shell with: > sudo ./hubot-slack dev
run connected to slack: > sudo ./hubot-slack start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment