Skip to content

Commit

Permalink
fix: add condition to setup package and apps with brew
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jun 18, 2024
1 parent 8545142 commit 3715f41
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions macos/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ done

echo '####################################################################'
brewInstallation() {
APP_LIST=("openkey" "rectangle" "maccy" "keepingyouawake" "iterm2" "skype" "spotify" "anydesk" "teamviewer" "obs" "chatgpt" "slack" "gpg-suite" "notion" "zoom" "figma" "vlc")
APP_LIST=("openkey" "rectangle" "maccy" "keepingyouawake" "iterm2" "karabiner-elements" "skype" "spotify" "anydesk" "teamviewer" "obs" "chatgpt" "slack" "gpg-suite" "notion" "zoom" "figma" "vlc")

for appName in "${APP_LIST[@]}"; do
echo "=========================== $appName ==========================="
Expand Down Expand Up @@ -66,7 +66,6 @@ brewInstallation() {
echo ""
done
}
brewInstallation

brewFormulaInstallation() {
APP_LIST=("flameshot")
Expand Down Expand Up @@ -100,10 +99,40 @@ brewFormulaInstallation() {
echo ""
done
}
brewFormulaInstallation

while true; do
if [[ $ACCEPT_INSTALL =~ ^[Yy]$ ]]; then
yn="y"
else
read -r -p "Do you want to install packages, app with brew? (Y/N) " yn
fi
case $yn in
[Yy]*)
brewInstallation
brewFormulaInstallation
break
;;
[Nn]*) break ;;
*) echo "Please answer yes or no." ;;
esac
done

if [[ $ACCEPT_INSTALL =~ ^[Yy]$ ]]; then
sudo spctl --master-enable
fi

bash config.sh
while true; do
if [[ $ACCEPT_INSTALL =~ ^[Yy]$ ]]; then
yn="y"
else
read -r -p "Do you want to install zsh (Need if it not installed)? (Y/N) " yn
fi
case $yn in
[Yy]*)
bash config.sh
break
;;
[Nn]*) break ;;
*) echo "Please answer yes or no." ;;
esac
done

0 comments on commit 3715f41

Please sign in to comment.