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
44 [ "${basefile}" == ".ssh" ] && continue
47 if [ -L ${basefile} ]; then
48 # Someone already created this link. Pass over it in silence
50 elif [ ! -a ${basefile} ]; then
52 ln -s ${relfile} || die "failed to link ${relfile}"
53 echo "created ${relfile}..."
54 elif [ -f ${basefile} ]; then
55 echo "${basefile} already exists as a regular file"
57 echo "${basefile} already exists"
62 if [ $copy_ssh_old -eq 1 ]; then
63 echo "copying files from .ssh-old to .ssh"
64 cp -f ../.ssh-old/* ../.ssh
65 echo "chmod 600 ../.ssh/config"
69 # Install .gradle/.gradle.properties
72 rm -f ./gradle.properties
73 ln -s ../.gradle.properties ./gradle.properties