Created
February 28, 2013 17:30
-
-
Save benshimmin/5058495 to your computer and use it in GitHub Desktop.
Open JIRA tickets from the commandline!
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# Open JIRA tickets from the commandline! | |
# | |
# Installation: | |
# | |
# $ sudo ln jira.sh /usr/bin/jira | |
if [ -z $1 ] | |
then | |
printf "Missing argument: ticket number\n" | |
printf "Usage:\njira ticket\n" | |
exit 1 | |
fi | |
HOST_NAME="https://jira.<YOUR JIRA HOSTNAME HERE>/browse/" | |
PROJ_NAME="<YOUR JIRA PROJECT'S PREFIX HERE>" | |
case "$OSTYPE" in | |
darwin*) | |
CMD=open | |
;; | |
linux*) | |
CMD=xdg-open | |
;; | |
esac | |
$CMD $HOST_NAME$PROJ_NAME"-"$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment