PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/etckeeper/init.d/40vcs-init

http://github.com/brinkman83/bashrc
Shell | 17 lines | 15 code | 1 blank | 1 comment | 5 complexity | 6fb1448525d351f443a36238f1cf9c3c MD5 | raw file
 1#!/bin/sh
 2set -e
 3
 4if [ "$VCS" = git ] && [ ! -e .git ]; then
 5	git init
 6	echo "$(hostname) /etc repository" > .git/description
 7elif [ "$VCS" = hg ] && [ ! -e .hg ]; then
 8	hg init
 9	echo  "[web]" > .hg/hgrc
10	echo  "description = $(hostname) /etc repository" >> .hg/hgrc
11elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then
12	bzr init
13	bzr nick "$(hostname) /etc repository"
14elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then
15	darcs initialize
16	echo "$(hostname) /etc repository" > _darcs/prefs/motd
17fi