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