--- /dev/null
+#!/bin/sh
+
+#
+# install-symlinks.sh
+#
+# Script for installing symlinks to these rc files into your home directory.
+# It's assumed that your home directory is the directory immediately above this
+# one.
+#
+# Colin McCabe
+#
+
+die() {
+ echo "$@"
+ exit 1
+}
+
+FULLPATH=`readlink -f $0`
+BASEDIR=`dirname ${FULLPATH}`
+for file in ${BASEDIR}/.[^.]*; do
+ # get base file name, like ".gitconfig"
+ basefile=`basename ${file}`
+
+ # get relative file name, like "cmccabe-etc/.gitconfig"
+ relfile=`echo ${file} | sed 's_.*/\([^/]*/[^/]*\)$_\1_'`
+
+ # skip files which we don't want to link
+ if [ "${basefile}" == ".git" ]; then
+ continue;
+ fi
+
+ pushd .. > /dev/null
+ if [ -L ${basefile} ]; then
+ # Someone already created this link. Pass over it in silence
+ :
+ elif [ -z ${basefile} ]; then
+ # Create the link
+ ln -s ${relfile} || die "failed to link ${relfile}"
+ echo "created ${relfile}..."
+ elif [ -f ${basefile} ]; then
+ echo "${basefile} already exists as a regular file"
+ else
+ echo "${basefile} already exists"
+ fi
+ popd > /dev/null
+done