Skip to content

Instantly share code, notes, and snippets.

@Kubuxu
Last active July 15, 2016 16:21
Show Gist options
  • Save Kubuxu/cf108566692b9e08a8c990a1614899f1 to your computer and use it in GitHub Desktop.
Save Kubuxu/cf108566692b9e08a8c990a1614899f1 to your computer and use it in GitHub Desktop.
gx-set() {
jq ".$1=\"$2\"" package.json | ifne sponge package.json
}
gx-github() {
REPO=$(echo $(pwd) | sed -ne 's|^.*/\(github.com/.\)|\1|p')
if [[ ! -z ${REPO} ]]; then
gx-set author $(echo $REPO | cut -d'/' -f 2)
gx-set bugs.URL "https://$REPO/issues"
fi
}
gx-init() {
printf 'go\n\n' | gx init
gx-github
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment