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 .bashrc .ssh .profile; do
20 if [ -f ../$file ]; then
21 if [ -L ../$file ]; then
24 echo "moving old $file to $file-old"
25 mv -f ../$file ../$file-old
26 if [ $file == .ssh ]; then
34 for file in ${BASEDIR}/.[^.]*; do
35 # get base file name, like ".gitconfig"
36 basefile=`basename ${file}`
38 # get relative file name, like "cmccabe-etc/.gitconfig"
39 relfile=`echo ${file} | sed 's_.*/\([^/]*/[^/]*\)$_\1_'`
41 # skip files which we don't want to link
42 [ "${basefile}" == ".git" ] && continue
43 [ "${basefile}" == ".gitignore" ] && continue
46 if [ -L ${basefile} ]; then
47 # Someone already created this link. Pass over it in silence
49 elif [ ! -a ${basefile} ]; then
51 ln -s ${relfile} || die "failed to link ${relfile}"
52 echo "created ${relfile}..."
53 elif [ -f ${basefile} ]; then
54 echo "${basefile} already exists as a regular file"
56 echo "${basefile} already exists"
61 if [ $copy_ssh_old -eq 1 ]; then
62 echo "copying files from .ssh-old to .ssh"
63 cp -f ../.ssh-old/* ../.ssh
64 echo "chmod 600 ../.ssh/config"