This is an old revision of the document!
#!/bin/bash export PATH=${PATH}:/usr/local/sbin:/usr/local/bin function commit_dir { if [ -d ${1} ] then cd ${1} if [ ! -d .hg ] then hg init fi hg addremove hg commit --config ui.username="`hostname`" -m "Update `date`" fi } commit_dir /etc/ commit_dir /usr/local/etc/
This script will init a repo to the two etc dirs and update the repo as changes are made to the config in each directory. You can add new entries at the bottom of the script to have make mercurial repos for more config directories.
mkdir /scripts cd /scripts wget -O commit_configs.sh http://wiki.sebeka.k12.mn.us/_export/code/ubuntu:merc_etc?codeblock=0 chmod 755 commit_configs.sh /scripts/commit_configs.sh cd /etc/cron.daily ln -s /scripts/commit_configs.sh