Indent
This commit is contained in:
+12
-6
@@ -53,7 +53,10 @@ if ! command -v whiptail >/dev/null; then
|
||||
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
sudo pacman -S whiptail --noconfirm || { echo "Failed to install whiptail. Exiting."; exit 1; }
|
||||
sudo pacman -S whiptail --noconfirm || {
|
||||
echo "Failed to install whiptail. Exiting."
|
||||
exit 1
|
||||
}
|
||||
# Reload zsh if it exists
|
||||
if command -v zsh -h >/dev/null; then
|
||||
source ~/.zshrc
|
||||
@@ -64,7 +67,10 @@ if ! command -v whiptail >/dev/null; then
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing prerequisites"
|
||||
sudo apt install whiptail -y || { echo "Failed to install whiptail. Exiting."; exit 1; }
|
||||
sudo apt install whiptail -y || {
|
||||
echo "Failed to install whiptail. Exiting."
|
||||
exit 1
|
||||
}
|
||||
# Reload zsh if it exists
|
||||
if command -v zsh -h >/dev/null; then
|
||||
source ~/.zshrc
|
||||
@@ -102,7 +108,7 @@ set -eu pipefail
|
||||
|
||||
# Process selected options
|
||||
for selection in $CHOICE; do
|
||||
clean_selection=$(echo $selection | tr -d '"')
|
||||
clean_selection=$(echo "$selection " | tr -d '"')
|
||||
case $clean_selection in
|
||||
"1")
|
||||
echo "Running zsh setup script..."
|
||||
@@ -129,9 +135,9 @@ for selection in $CHOICE; do
|
||||
if ! command -v docker >/dev/null; then
|
||||
echo "docker is NOT installed. Installing..."
|
||||
curl -fsSL https://get.docker.com | sh
|
||||
sudo usermod -aG docker $USER
|
||||
sudo usermod -aG docker "$USER"
|
||||
else
|
||||
sudo usermod -aG docker $USER
|
||||
sudo usermod -aG docker "$USER"
|
||||
echo "Docker is already installed."
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
@@ -187,7 +193,7 @@ for selection in $CHOICE; do
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
cd $PreviousWD
|
||||
cd "$PreviousWD"
|
||||
rm -rf /tmp/yay_install
|
||||
else
|
||||
echo "Yay is already installed."
|
||||
|
||||
Reference in New Issue
Block a user