diff --git a/LazyVim.sh b/LazyVim.sh index c654a6d..8787dd2 100755 --- a/LazyVim.sh +++ b/LazyVim.sh @@ -1,6 +1,10 @@ # Install prerequisetes sudo pacman -S --needed --noconfirm git curl wget python3 python-pip +# Show nvim config replacement +echo 'This script will move your old nvim config to ~/.local/share/nvim.bak' +sleep 20 && echo "Use CTRL+C within 20 secconds if you don't want these actions to be made" + # Remove old backups if [ -e "~/.config/nvim.bak" ]; then # The path exists (it could be a file, a directory, a symlink, etc.) @@ -38,6 +42,6 @@ git clone https://github.com/alvinlollo/LazyVim ~/.config/nvim # Dependencys for Gdoc.vim wget https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/requirements.txt -pip3 install -r requirements.txt --break-system-packages +pip3 install -r requirements.txt --break-system-packages && rm requirements.txt echo "pip3 install -r requirements.txt" diff --git a/installbeta.sh b/installbeta.sh index 754f8fd..8f3c11e 100755 --- a/installbeta.sh +++ b/installbeta.sh @@ -9,7 +9,7 @@ echo ' |____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/ |___/ - --------------- Single Download script (BETA) --------------- + --------------- Single Download script (Beta) --------------- BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. See the LICENCE for more detail ' @@ -24,12 +24,32 @@ function error_handler() { trap error_handler ERR #Install prerequisites -sudo pacman -Syu git zsh curl --noconfirm --needed +sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed + +if command -v pacman >/dev/null; then + echo "pacman detected. Installing prerequisites" + sudo pacman -Syu git zsh curl wget whiptail golang fakeroot debugedit make gcc --noconfirm --needed +fi + +if command -v apt >/dev/null; then + echo "apt detected. Installing prerequisites" + sudo apt install git zsh curl wget whiptail -y +fi # Ensure whiptail is installed if ! command -v whiptail >/dev/null; then echo "whiptail is not installed. Installing it now..." - sudo pacman -S --noconfirm whiptail || { echo "Failed to install whiptail. Exiting."; exit 1; } + + 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; } + fi + + 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; } + fi + fi # Options for the whiptail menu @@ -89,7 +109,7 @@ for selection in $CHOICE; do ;; "5") echo "Installing Yay and Yay Packages..." - if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl; then # These were in the original script before yay install + if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl; then echo "--------------------------------------------------------------------" echo "Failed to install prerequisite packages for Yay. You can try running it manually:" echo "sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl" @@ -126,4 +146,4 @@ for selection in $CHOICE; do esac done -echo "Installation process complete." \ No newline at end of file +echo "Installation process complete."