/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
  2. set -e
  3. if [ "$VCS" = git ] && [ ! -e .git ]; then
  4. git init
  5. echo "$(hostname) /etc repository" > .git/description
  6. elif [ "$VCS" = hg ] && [ ! -e .hg ]; then
  7. hg init
  8. echo "[web]" > .hg/hgrc
  9. echo "description = $(hostname) /etc repository" >> .hg/hgrc
  10. elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then
  11. bzr init
  12. bzr nick "$(hostname) /etc repository"
  13. elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then
  14. darcs initialize
  15. echo "$(hostname) /etc repository" > _darcs/prefs/motd
  16. fi