Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
fix: typo in install script
Browse files Browse the repository at this point in the history
  • Loading branch information
mschrage committed Jun 22, 2021
1 parent d8fea9f commit b62eac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/install_and_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ append_to_profiles() {
# Replace old sourcing in profiles
for rc in .profile .zprofile .bash_profile; do
if [[ -e "${HOME}/${rc}" ]]; then
sed -i '' 's/~\/.fig\/exports\/env.sh/~\/.fig\/fig.sh/g' "~/.${rc}" 2> /dev/null
sed -i '' 's/~\/.fig\/exports\/env.sh/~\/.fig\/fig.sh/g' "${HOME}/${rc}" 2> /dev/null
fi
done

# Check that the file exists and whether we've source fig.sh. If file exists and doesn't contain fig.sh, add it
# We don't want to appened fig.sh to files that doen't exist, because it creates them and might change shell behavior
for rc in .profile .zprofile .bash_profile .bashrc .zshrc; do
if [[ -f "${HOME}/${rc}" ]] && ! grep -q 'source ~/.fig/fig.sh' "${HOME}/${rc}"; then
echo "${FIG_FULLSOURCEVAR}" >> "~/.${rc}"
echo "${FIG_FULLSOURCEVAR}" >> "${HOME}/${rc}"
fi
done
}
Expand Down

0 comments on commit b62eac3

Please sign in to comment.