Changed the default values to n

This commit is contained in:
Sebastian 2024-09-03 20:11:26 +02:00
parent c3cfc79978
commit c5d43bee4e

View file

@ -2,7 +2,7 @@
############# Packages to install ######################################## ############# Packages to install ########################################
macos_homebrew_essentials="python3 vim-nox tmux nano zsh git autossh mosh sshuttle lynx npm tidy mcfly ack ncdu shfmt" macos_homebrew_essentials="python3 vim-nox tmux nano zsh git autossh mosh sshuttle lynx npm tidy mcfly ack ncdu shfmt up htop"
macos_homebrew_other_apps="calibre" macos_homebrew_other_apps="calibre"
raspberrypi_essentials="python3 python3-pip vim-nox python3-venv tmux nano zsh git htop ncdu autossh mosh sshuttle fail2ban avahi-daemon ufw lynx npm ssmtp apticron tidy nmon software-properties-common ack restic unrar cmake" raspberrypi_essentials="python3 python3-pip vim-nox python3-venv tmux nano zsh git htop ncdu autossh mosh sshuttle fail2ban avahi-daemon ufw lynx npm ssmtp apticron tidy nmon software-properties-common ack restic unrar cmake"
raspberrypi_printer="cups printer-driver-gutenprint" raspberrypi_printer="cups printer-driver-gutenprint"
@ -43,23 +43,23 @@ fi
if [ "$system_type" = "Linux" ]; then if [ "$system_type" = "Linux" ]; then
install_this_now="" install_this_now=""
echo "Install the most important packages ($raspberrypi_essentials)? (y/n, default=y)" echo "Install the most important packages ($raspberrypi_essentials)? (y/n, default=n)"
read -r install_raspberrypi_essentials read -r install_raspberrypi_essentials
install_raspberrypi_essentials=${install_raspberrypi_essentials:-y} install_raspberrypi_essentials=${install_raspberrypi_essentials:-n}
if echo "$install_raspberrypi_essentials" | grep -qi '^[yj]$'; then if echo "$install_raspberrypi_essentials" | grep -qi '^[yj]$'; then
install_this_now="$install_this_now $raspberrypi_essentials" install_this_now="$install_this_now $raspberrypi_essentials"
fi fi
echo "Install the packages for printing? (y/n, default=y)" echo "Install the packages for printing? (y/n, default=n)"
read -r install_raspberrypi_printer read -r install_raspberrypi_printer
install_raspberrypi_printer=${install_raspberrypi_printer:-y} install_raspberrypi_printer=${install_raspberrypi_printer:-n}
if echo "$install_raspberrypi_printer" | grep -qi '^[yj]$'; then if echo "$install_raspberrypi_printer" | grep -qi '^[yj]$'; then
install_this_now="$install_this_now $raspberrypi_printer" install_this_now="$install_this_now $raspberrypi_printer"
fi fi
echo "Install the packages for the camera? (y/n, default=y)" echo "Install the packages for the camera? (y/n, default=n)"
read -r install_raspberrypi_camera read -r install_raspberrypi_camera
install_raspberrypi_camera=${install_raspberrypi_camera:-y} install_raspberrypi_camera=${install_raspberrypi_camera:-n}
if echo "$install_raspberrypi_camera" | grep -qi '^[yj]$'; then if echo "$install_raspberrypi_camera" | grep -qi '^[yj]$'; then
install_this_now="$install_this_now $raspberrypi_camera" install_this_now="$install_this_now $raspberrypi_camera"
fi fi
@ -74,9 +74,9 @@ if [ "$system_type" = "Linux" ]; then
fi fi
if command -v ufw >/dev/null 2>&1; then if command -v ufw >/dev/null 2>&1; then
echo "Enable the firewall (ufw with ssh allowed)? (y/n, default=y)" echo "Enable the firewall (ufw with ssh allowed)? (y/n, default=n)"
read -r enable_ufw read -r enable_ufw
enable_ufw=${enable_ufw:-y} enable_ufw=${enable_ufw:-n}
if echo "$enable_ufw" | grep -qi '^[yj]$'; then if echo "$enable_ufw" | grep -qi '^[yj]$'; then
ufw allow ssh ufw allow ssh
ufw enable ufw enable
@ -86,25 +86,25 @@ fi
############# Commands for both ########################################## ############# Commands for both ##########################################
if command -v /bin/zsh >/dev/null 2>&1; then if command -v /bin/zsh >/dev/null 2>&1; then
echo "Set zsh as default shell? (y/n, default=y)" echo "Set zsh as default shell? (y/n, default=n)"
read -r set_default_shell read -r set_default_shell
set_default_shell=${set_default_shell:-y} set_default_shell=${set_default_shell:-n}
if echo "$set_default_shell" | grep -qi '^[yj]$'; then if echo "$set_default_shell" | grep -qi '^[yj]$'; then
chsh -s /bin/zsh chsh -s /bin/zsh
fi fi
fi fi
echo "Install all linters for vim? (y/n, default=y)" echo "Install all linters for vim? (y/n, default=n)"
read -r install_linters read -r install_linters
install_linters=${install_linters:-y} install_linters=${install_linters:-n}
if echo "$install_linters" | grep -qi '^[yj]$'; then if echo "$install_linters" | grep -qi '^[yj]$'; then
install_npm_linters install_npm_linters
install_python_linters install_python_linters
fi fi
echo "Install the vim plugins now? (y/n, default=y)" echo "Install the vim plugins now? (y/n, default=n)"
read -r install_vim_plugins read -r install_vim_plugins
install_vim_plugins=${install_vim_plugins:-y} install_vim_plugins=${install_vim_plugins:-n}
if echo "$install_vim_plugins" | grep -qi '^[yj]$'; then if echo "$install_vim_plugins" | grep -qi '^[yj]$'; then
vim +'PlugInstall --sync' +qa vim +'PlugInstall --sync' +qa
echo "Done!" echo "Done!"