This commit is contained in:
alvinlollo
2026-07-17 19:48:33 +10:00
parent 7541db9354
commit 0112c73e02
+16 -10
View File
@@ -7,8 +7,8 @@ if [ "$1" = "--skip-watermark" ]; then
fi
if [ "$skip_watermark" = false ]; then
clear
echo '
clear
echo '
____ _ _ _ _ _
| __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___
| _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \
@@ -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
@@ -86,7 +92,7 @@ OPTIONS=(
)
CHOICE=$(whiptail --title "Installation Options" --checklist \
"Choose components to install:" 20 78 10 \
"Choose components to install:" 20 78 10 \
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
exitstatus=$?
@@ -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..."
@@ -117,7 +123,7 @@ for selection in $CHOICE; do
"2")
echo "Running LazyVim setup script..."
# Runs local script unless it does not exist or fails
if [[ -f "LazyVim.sh" ]];then
if [[ -f "LazyVim.sh" ]]; then
echo "Found local script, running..."
bash LazyVim.sh
else
@@ -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."