From 0c90264710f0a87ecb59acc76ae2f11aebfd4bc1 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Thu, 29 Aug 2024 23:57:57 +0200 Subject: [PATCH] Fixed compatibility sh and bash --- .config/yadm/bootstrap | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index b1e4053..e38c806 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -33,7 +33,7 @@ if [ "$system_type" = "Darwin" ]; then if ! command -v brew >/dev/null 2>&1; then echo "Do you want to install homebrew? (y/n)" read -r install_homebrew - if [[ $install_homebrew == "y" ]]; then + if [ $install_homebrew == "y" ]; then echo "Installing homebrew" /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" fi @@ -49,25 +49,25 @@ if [ "$system_type" = "Linux" ]; then echo "Do you want to install the most important packages ($raspberrypi_essentials)? (y/n)" read -r install_raspberrypi_essentials - if [[ $install_raspberrypi_essentials == "y" ]]; then + if [ $install_raspberrypi_essentials == "y" ]; then install_this_now="$install_this_now $raspberrypi_essentials" fi echo "Do you want to install the packages for printing? (y/n)" read -r install_raspberrypi_printer - if [[ $install_raspberrypi_printer == "y" ]]; then + if [ $install_raspberrypi_printer == "y" ]; then install_this_now="$install_this_now $raspberrypi_printer" fi echo "Do you want to install the packages for the camera? (y/n)" read -r install_raspberrypi_camera - if [[ $install_raspberrypi_camera == "y" ]]; then + if [ $install_raspberrypi_camera == "y" ]; then install_this_now="$install_this_now $raspberrypi_camera" fi - if [[ -n "${install_this_now}" ]]; then + if [ -n "$install_this_now" ]; then echo "Packages will be installed now!" sudo apt update && sudo apt install $install_this_now @@ -78,7 +78,7 @@ fi if command -v ufw >/dev/null 2>&1; then echo "Do you want to enable the firewall (ufw with ssh allowed)? (y/n)" read -r enable_ufw - if [[ $enable_ufw == "y" ]]; then + if [ $enable_ufw == "y" ]; then ufw allow ssh ufw enable @@ -92,14 +92,14 @@ fi if command -v /bin/zsh >/dev/null 2>&1; then echo "Do you want to set zsh as default shell? (y/n)" read -r set_default_shell - if [[ $set_default_shell == "y" ]]; then + if [ $set_default_shell == "y" ]; then chsh -s /bin/zsh fi fi echo "Do you want to install all linters for vim? (y/n)" read -r install_linters -if [[ $install_linters == "y" ]]; then +if [ $install_linters == "y" ]; then install_npm_linters install_python_linters fi