From 9d1df29d8e822a0d8aae74d0aebf53f4f2e2cf17 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Thu, 10 Jan 2013 17:28:04 -0800 Subject: [PATCH] install-symlinks: also move aside .profile Signed-off-by: Colin McCabe --- install-symlinks.sh | 29 ++++++++++++----------------- 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/install-symlinks.sh b/install-symlinks.sh index 7c762bb..a479ffb 100755 --- a/install-symlinks.sh +++ b/install-symlinks.sh @@ -15,25 +15,20 @@ die() { exit 1 } -if [ -f ../.bashrc ]; then - if [ -L ../.bashrc ]; then - : - else - echo "moving old .bashrc to .bashrc-old" - mv -f ../.bashrc ../.bashrc-old - fi -fi - copy_ssh_old=0 -if [ -d ../.ssh ]; then - if [ -L ../.ssh ]; then - : - else - echo "moving old .ssh to .ssh-old" - mv -f ../.ssh ../.ssh-old - copy_ssh_old=1 +for file in .bashrc .ssh .profile; do + if [ -f ../$file ]; then + if [ -L ../$file ]; then + : + else + echo "moving old $file to $file-old" + mv -f ../$file ../$file-old + if [ $file == .ssh ]; then + copy_ssh_old=1 + fi + fi fi -fi +done BASEDIR=`pwd` for file in ${BASEDIR}/.[^.]*; do -- 1.6.6.rc1.39.g9a42