Skip to content

Commit

Permalink
mod: #7 正常終了を確認するために "||" を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
KeitaSHIBUYA committed Feb 22, 2024
1 parent ce5cfb1 commit 63eaab1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/mac_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if ! command -v starship &>/dev/null; then
read -r answer
case $answer in
[Yy]* )
curl -sS https://starship.rs/install.sh
curl -sS https://starship.rs/install.sh || exit 1
# echo 'eval "$(starship init zsh)"' >> ~/.zshrc # .zshrcに記述済み
break;;
[Nn]* )
Expand Down
8 changes: 4 additions & 4 deletions bin/ubuntu_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if ! command -v zsh &> /dev/null; then
read -r answer
case $answer in
[Yy]* )
sudo apt update
sudo apt install -y zsh
sudo apt-get update || exit 1
sudo apt-get install -y zsh || exit 1
break;;
[Nn]* )
echo "zsh installation skipped."
Expand All @@ -24,7 +24,7 @@ fi
# デフォルトシェルをzshに切り替え
if [ "$SHELL" != "/bin/zsh" ]; then
echo "Switching default shell to zsh..."
chsh -s /bin/zsh
chsh -s /bin/zsh || exit 1
echo "You may need to log out and log back in for the changes to take effect."
else
echo "Default shell is already zsh."
Expand All @@ -37,7 +37,7 @@ if ! command -v starship &>/dev/null; then
read -r answer
case $answer in
[Yy]* )
curl -sS https://starship.rs/install.sh | bash
curl -sS https://starship.rs/install.sh || exit 1
# echo 'eval "$(starship init zsh)"' >> ~/.zshrc # .zshrcに記述済み
break;;
[Nn]* )
Expand Down

0 comments on commit 63eaab1

Please sign in to comment.