Skip to content

Commit

Permalink
chore: use sh not bash
Browse files Browse the repository at this point in the history
  • Loading branch information
healthjyk committed Dec 27, 2023
1 parent ccfee08 commit bc1ad63
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions static/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ install() {
# detect profile
detected_profile=$(detectProfile "$(basename $SHELL)" "$(uname -s)")
if [ -z "${detected_profile-}" ]; then
error "No supported user profile found. Already tried \$PROFILE ($PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, ~/.profile, and ~/.config/fish/config.fish."
error "No supported user profile found. Already tried \$PROFILE, ~/.bashrc, ~/.bash_profile, ~/.zshrc, ~/.profile, and ~/.config/fish/config.fish."
return 1
fi

Expand Down Expand Up @@ -258,28 +258,28 @@ detectProfile() {
# differs between macOS and everything else.
case $uname in
Darwin)
if [ -f "$HOME/.profile"]; then
if [ -f "$HOME/.profile" ]; then
echo "$HOME/.profile"
elif [ -f "$HOME/.bash_profile"]; then
elif [ -f "$HOME/.bash_profile" ]; then
echo "$HOME/.bash_profile"
elif [ -f "$HOME/.bashrc"]; then
elif [ -f "$HOME/.bashrc" ]; then
echo "$HOME/.bashrc"
elif [ -f "$HOME/.zshrc"]; then
elif [ -f "$HOME/.zshrc" ]; then
echo "$HOME/.zshrc"
elif [ -f "$HOME/.config/fish/config.fish"]; then
elif [ -f "$HOME/.config/fish/config.fish" ]; then
echo "$HOME/.config/fish/config.fish"
fi
;;
*)
if [ -f "$HOME/.profile"]; then
if [ -f "$HOME/.profile" ]; then
echo "$HOME/.profile"
elif [ -f "$HOME/.bashrc"]; then
elif [ -f "$HOME/.bashrc" ]; then
echo "$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile"]; then
elif [ -f "$HOME/.bash_profile" ]; then
echo "$HOME/.bash_profile"
elif [ -f "$HOME/.zshrc"]; then
elif [ -f "$HOME/.zshrc" ]; then
echo "$HOME/.zshrc"
elif [ -f "$HOME/.config/fish/config.fish"]; then
elif [ -f "$HOME/.config/fish/config.fish" ]; then
echo "$HOME/.config/fish/config.fish"
fi
;;
Expand Down

0 comments on commit bc1ad63

Please sign in to comment.