Skip to content
Snippets Groups Projects
Commit 70d28a40 authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Merge branch 'master' into debian

parents 0fddab72 98a1fbf7
No related branches found
No related tags found
No related merge requests found
Alphabetical list of everyone who ever committed to this repository
Vincent Demeester <vincent@demeester.fr>
Richard Hartmann <richih+github.com@richih.org>
Richard Hartmann <richih.mailinglist@gmail.com>
Dieter Plaetinck <dieter@plaetinck.be>
Corey Quinn <corey@sequestered.net>
Gernot Schulz <post@gernot-schulz.com>
......@@ -152,11 +152,13 @@ To illustrate further, the following steps could move your desired
configuration to a new host.
1. Clone the mr repository (containing available.d, config.d etc.); for
example: `vcsh clone git://github.com/RichiH/vcsh_mr_template.git`
example: `vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr`
2. Choose your repositories by linking them in config.d (or go with the default
you may have already configured by adding symlinks to git).
3. Run mr to clone the repositories: `cd; mr update`.
4. Done.
3. Make sure the line 'include = cat /usr/share/mr/vcsh' in .mrconfig points
to an existing file
4. Run mr to clone the repositories: `cd; mr update`.
5. Done.
Hopefully the above could help explain how this approach saves time by
......@@ -195,13 +197,15 @@ the template will be stored.
#### 4.1.2 Clone the Template ####
cd $HOME
mkdir -p ~/work/git
cd !$
git clone git://github.com/RichiH/vcsh.git vcsh
# make sure 'include = cat /usr/share/mr/vcsh' points to an exiting file
vim .mrconfig
cd vcsh
ln -s vcsh /usr/local/bin # or add it to your PATH
cd
vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr.vcsh
vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr
#### 4.1.3 Enable Your Test Repository ####
......@@ -236,7 +240,9 @@ Done!
You're welcome to clone the example repository:
vcsh clone git://github.com/RichiH/vcsh_mr_template.git
vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr
# make sure 'include = cat /usr/share/mr/vcsh' points to an exiting file
vim .mrconfig
Look around in the clone. It should be reasonably simple to understand. If not,
poke me, RichiH, on Freenode (query) or OFTC (#vcs-home).
......@@ -267,6 +273,8 @@ mr is used to actually retrieve configs, etc
~ % cat ~/.mrconfig
[DEFAULT]
# adapt /usr/share/mr/vcsh to your system if needed
include = cat /usr/share/mr/vcsh
include = cat $XDG_CONFIG_HOME/mr/config.d/*
~ % echo $XDG_CONFIG_HOME
/home/richih/.config
......
......@@ -48,7 +48,8 @@ The use of symlinks is not needed in this setup, making for a cleaner setup.
vcsh. That being said, you can easily use `vcsh` without `mr` if you prefer.
A sample configuration for `vcsh` and `mr` can be found at
*https://github.com/RichiH/vcsh_mr_template*
*https://github.com/RichiH/vcsh_mr_template* and used with `vcsh clone
https://github.com/RichiH/vcsh_mr_template mr`.
Please note that you can always use a path instead of a name for <repo>.
This is needed to support mr and other scripts properly and of no concern to
......
#!/bin/sh
echo 'Alphabetical list of everyone who ever committed to this repository
'
git log --all --format='%an <%ae>' | sort -u -k2
......@@ -94,9 +94,9 @@ delete() {
$files
AGAIN, THIS WILL DELETE YOUR DATA!
To continue, type \"Yes, do as I say\""
To continue, type 'Yes, do as I say'"
read answer
[ "x$answer" = "xYes, do as I say" ] || exit 16
[ "x$answer" = 'xYes, do as I say' ] || exit 16
for file in $files; do
rm -f $file || info "could not delete '$file', continuing with deletion"
done
......@@ -117,6 +117,7 @@ git_dir_exists() {
hook() {
for hook in $VCSH_HOOK_D/$1* $VCSH_HOOK_D/$VCSH_REPO_NAME.$1*; do
[ -x "$hook" ] || continue
info "executing '$hook'"
"$hook"
done
}
......@@ -213,8 +214,8 @@ write_gitignore() {
fatal "could not move '$tempfile' to '$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME'" 53
}
if [ ! x$VCSH_GITIGNORE = x'exact' ] && [ ! x$VCSH_GITIGNORE = x'recursive' ]; then
fatal "\$VCSH_GITIGNORE must be either 'exact' or 'recursive'" 1
if [ ! "x$VCSH_GITIGNORE" = 'xexact' ] && [ ! "x$VCSH_GITIGNORE" = 'xrecursive' ]; then
fatal "'\$VCSH_GITIGNORE' must be either 'exact' or 'recursive'" 1
fi
if [ "$1" = 'clone' ]; then
......@@ -265,7 +266,7 @@ fi
# Mangle the input to fit normal operation.
if echo $VCSH_REPO_NAME | grep -q '/'; then
export GIT_DIR=$VCSH_REPO_NAME
export VCSH_REPO_NAME=$(basename $VCSH_REPO_NAME .git)
export VCSH_REPO_NAME=$(basename "$VCSH_REPO_NAME" .git)
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment