You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
503 B
Plaintext

2 years ago
#!/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