Initial commit.
This commit is contained in:
18
etckeeper/init.d/40vcs-init
Executable file
18
etckeeper/init.d/40vcs-init
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
description="$(hostname 2>/dev/null || cat /etc/hostname) /etc repository"
|
||||
if [ "$VCS" = git ] && [ ! -e .git ]; then
|
||||
git init
|
||||
echo "$description" > .git/description
|
||||
elif [ "$VCS" = hg ] && [ ! -e .hg ]; then
|
||||
hg init
|
||||
echo "[web]" > .hg/hgrc
|
||||
echo "description = $description" >> .hg/hgrc
|
||||
elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then
|
||||
bzr init
|
||||
bzr nick "$description"
|
||||
elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then
|
||||
darcs initialize
|
||||
echo "$description" > _darcs/prefs/motd
|
||||
fi
|
||||
Reference in New Issue
Block a user