From: Richard Hartmann Date: Sat, 15 Mar 2014 13:58:30 +0000 (+0100) Subject: Merge remote-tracking branch 'jfw/master' X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/e065ccfe1eb635cb039254cde12003616c4f0b1f?hp=952eff91dd9817446386806e5333f8822efec9f3 Merge remote-tracking branch 'jfw/master' --- diff --git a/doc/sample_hooks/post-init-add-origin b/doc/sample_hooks/post-init-add-origin new file mode 100755 index 0000000..993f3c7 --- /dev/null +++ b/doc/sample_hooks/post-init-add-origin @@ -0,0 +1,18 @@ +#!/bin/sh + +# This adds a remote origin at $GITURL/dotfiles/$VCSH_DIRECTORY which +# 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 diff --git a/doc/sample_hooks/post-init-setup-mr b/doc/sample_hooks/post-init-setup-mr new file mode 100755 index 0000000..a38c012 --- /dev/null +++ b/doc/sample_hooks/post-init-setup-mr @@ -0,0 +1,10 @@ +#!/bin/sh + +# This sets up your new repos with mr. + +cat > $HOME/.config/mr/available.d/$VCSH_DIRECTORY.vcsh << EOF +[\$HOME/.config/vcsh/repo.d/$VCSH_DIRECTORY.git] +checkout = vcsh clone $GITURL/dotfiles/$VCSH_DIRECTORY.git +EOF + +ln -s $HOME/.config/mr/available.d/$VCSH_DIRECTORY.vcsh $HOME/.config/mr/config.d/