6 # Script for installing symlinks to these rc files into your home directory.
7 # It's assumed that your home directory is the directory immediately above this
18 FULLPATH=`readlink -f $0`
19 BASEDIR=`dirname ${FULLPATH}`
20 for file in ${BASEDIR}/.[^.]*; do
21 # get base file name, like ".gitconfig"
22 basefile=`basename ${file}`
24 # get relative file name, like "cmccabe-etc/.gitconfig"
25 relfile=`echo ${file} | sed 's_.*/\([^/]*/[^/]*\)$_\1_'`
27 # skip files which we don't want to link
28 if [ "${basefile}" == ".git" ]; then
33 if [ -L ${basefile} ]; then
34 # Someone already created this link. Pass over it in silence
36 elif [ -z ${basefile} ]; then
38 ln -s ${relfile} || die "failed to link ${relfile}"
39 echo "created ${relfile}..."
40 elif [ -f ${basefile} ]; then
41 echo "${basefile} already exists as a regular file"
43 echo "${basefile} already exists"