Skip to content
Snippets Groups Projects
Commit 2ef5c0c8 authored by Jeff Fein-Worton's avatar Jeff Fein-Worton
Browse files

Improved post-init-add-origin hook

Added better help text
Added error message if $GITURL unset
parent 0be68e89
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
# This adds a remote origin at $GITURL/dotfiles/$VCSH_DIRECTORY # This adds a remote origin at $GITURL/dotfiles/$VCSH_DIRECTORY which
# Assumes $GITURL is set to the base of your remote repos. # is helpful for creating new dotfile repositories that you plan to
# store on (e.g.) Github.
#
# You must set $GITURL in order to use this hook. For example, add the
# following to your .bashrc (or equivalent for your shell), replacing
# YOURUSERNAME with your github username:
#
# export GITURL="git@github.com:YOURUSERNAME"
if [ -z $GITURL ]; then
echo "\$GITURL is not set; please see post-init-add-origin hook"
exit 1;
fi
vcsh $VCSH_DIRECTORY remote add origin $GITURL/dotfiles/$VCSH_DIRECTORY vcsh $VCSH_DIRECTORY remote add origin $GITURL/dotfiles/$VCSH_DIRECTORY
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment