Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Set ghib to remember last repo
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybatch committed Dec 20, 2017
1 parent 3ae8284 commit c2deb60
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions ghib
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,27 @@

source /usr/local/bin/colours
USAGE="ghib <repo url> [issue number]"
STORAGE=$HOME/.tobybatch/ghib

which /usr/local/bin/ghi > /dev/null
if [ "$?" != 0 ]; then
echo "$0 depends on ghi, https://github.com/tobybatch/ghi"
echo "sudo gem install ghi"
fi

if [ -z "$1" ]; then
echo $USAGE
exit 1;
if [ ! -z "$1" ]; then
mkdir -p $HOME/.tobybatch
echo $1 > $STORAGE
REPO=$1
fi

if [ -z "$REPO" ]; then
if [ -e "$STORAGE" ]; then
REPO=`cat $STORAGE`
else
echo $USAGE
exit 1;
fi
fi

if [ ! -z "$2" ]; then
Expand Down

0 comments on commit c2deb60

Please sign in to comment.