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 fi
if [ "$skip_watermark" = false ]; then if [ "$skip_watermark" = false ]; then
clear clear
echo ' echo '
____ _ _ _ _ _ ____ _ _ _ _ _
| __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___ | __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___
| _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \ | _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \
@@ -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
@@ -86,7 +92,7 @@ OPTIONS=(
) )
CHOICE=$(whiptail --title "Installation Options" --checklist \ 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) "${OPTIONS[@]}" 3>&1 1>&2 2>&3)
exitstatus=$? exitstatus=$?
@@ -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..."
@@ -117,7 +123,7 @@ for selection in $CHOICE; do
"2") "2")
echo "Running LazyVim setup script..." echo "Running LazyVim setup script..."
# Runs local script unless it does not exist or fails # 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..." echo "Found local script, running..."
bash LazyVim.sh bash LazyVim.sh
else else
@@ -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."