Created
December 1, 2016 07:46
-
-
Save umireon/c066a8213c5cfa39ae6bdbe1616c986b to your computer and use it in GitHub Desktop.
Revisions
-
umireon created this gist
Dec 1, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ REPOURL=$(git remote get-url origin | grep '^https://github.com') || { echo error: origin is not on github exit 1 } GITHUB_USER=${REPOURL#https://*/} GITHUB_USER=${GITHUB_USER%/*} GITHUB_REPO=${REPOURL#https://*/*/} GITHUB_REPO=${GITHUB_REPO%.git} echo $GITHUB_USER $GITHUB_REPO