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
19 for file in ${BASEDIR}/.[^.]*; do
20 # get base file name, like ".gitconfig"
21 basefile=`basename ${file}`
23 # get relative file name, like "cmccabe-etc/.gitconfig"
24 relfile=`echo ${file} | sed 's_.*/\([^/]*/[^/]*\)$_\1_'`
26 # skip files which we don't want to link
27 if [ "${basefile}" == ".git" ]; then
32 if [ -L ${basefile} ]; then
33 # Someone already created this link. Pass over it in silence
35 elif [ ! -a ${basefile} ]; then
37 ln -s ${relfile} || die "failed to link ${relfile}"
38 echo "created ${relfile}..."
39 elif [ -f ${basefile} ]; then
40 echo "${basefile} already exists as a regular file"
42 echo "${basefile} already exists"