diff --git a/install.sh b/install.sh index 4630b211..4a09e22b 100755 --- a/install.sh +++ b/install.sh @@ -3,6 +3,12 @@ BASH_IT=$(cd ${0%/*} && echo ${PWD}) cd "${OLDPWD}" cp "${HOME}/.bash_profile" "${HOME}/.bash_profile.bak" +BASH_PROFILE_BAK="${HOME}/.bash_profile.bak" +if [ -f "${BASH_PROFILE_BAK}" ]; then + list=($(ls "${BASH_PROFILE_BAK}"*)) + BASH_PROFILE_BAK="${BASH_PROFILE_BAK}.${#list[@]}" +fi + echo "Your original .bash_profile has been backed up to .bash_profile.bak" cp "${BASH_IT}/template/bash_profile.template.bash" "${HOME}/.bash_profile"