better handle fodlers/files in install script

This commit is contained in:
Matthias Kretschmann 2016-05-07 22:51:14 +02:00
parent 495d021dee
commit 8ed34c9293
Signed by: m
GPG Key ID: BD3C1F3EDD7831FC

View File

@ -6,7 +6,9 @@ FILES=".bash_aliases .bash_prompt .bashrc .profile bin .vimrc"
for FILE in $FILES; do
# remove old versions
if [ -f "$HOME/$FILE" ] ; then
if [ -f "$HOME/$FILE" ]; then
rm $HOME/$FILE
elif [ -d "$HOME/$FILE" ]; then
rm -r $HOME/$FILE
fi