File: 40vcs-init

package info (click to toggle)
etckeeper 1.15
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 412 kB
  • ctags: 41
  • sloc: sh: 1,072; python: 64; makefile: 58
file content (17 lines) | stat: -rwxr-xr-x 488 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e

if [ "$VCS" = git ] && [ ! -e .git ]; then
	git init
	echo "$(hostname) /etc repository" > .git/description
elif [ "$VCS" = hg ] && [ ! -e .hg ]; then
	hg init
	echo  "[web]" > .hg/hgrc
	echo  "description = $(hostname) /etc repository" >> .hg/hgrc
elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then
	bzr init
	bzr nick "$(hostname) /etc repository"
elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then
	darcs initialize
	echo "$(hostname) /etc repository" > _darcs/prefs/motd
fi