Skip to content

Commit

Permalink
[Installer] v2: touch .bash_profile if the file does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: hydai <[email protected]>
  • Loading branch information
hydai committed Jul 15, 2024
1 parent 2313fe9 commit 552fbae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/install_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ main() {
elif [[ "$_shell_" =~ "bash" ]]; then
local _grep=$(cat "$__HOME__/.bash_profile" 2>/dev/null | grep "$IPATH/env")
if [ "$_grep" = "" ]; then
# If the .bash_profile is not existing, create a new one
[ ! -f "$__HOME__/.bash_profile" ] && touch "$__HOME__/.bash_profile"
[ -f "$__HOME__/.bash_profile" ] && echo "$_source" >>"$__HOME__/.bash_profile"
fi
fi
Expand Down

0 comments on commit 552fbae

Please sign in to comment.