Use shelly instead of pacman
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
if ! command -v pacman >/dev/null; then
|
||||
echo "Cannot proceed: Not a arch based system"
|
||||
echo "This script does not have debian support"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Single-install-script
|
||||
|
||||
This script automatically installs my favourite Linux applications I use every day such as:
|
||||
[Docker](https://www.docker.com/), [zsh, oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh) and [neovim](https://neovim.io/). This uses pacman and [yay AUR helper](https://github.com/Jguer/yay). You can choose what sections to install with the whiptail menu.
|
||||
[Docker](https://www.docker.com/), [zsh, oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh) and [neovim](https://neovim.io/). This uses the [shelly-cli](https://github.com/Seafoam-Labs/Shelly-ALPM) package manager. You can choose what sections to install with the whiptail menu.
|
||||
|
||||
This script will use aim to use the [shelly-cli](https://github.com/Seafoam-Labs/Shelly-ALPM) installer.
|
||||
This script will automatically install [shelly-cli](https://github.com/Seafoam-Labs/Shelly-ALPM) if it is not already present.
|
||||
|
||||
Most of this script is intended for Arch Linux with some Debian compatibility on the zsh install script only.
|
||||
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
# Install Prerequisites
|
||||
sudo pacman -S --needed -noconfirm efibootmgr sbsigntools mokutil sbctl grub
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
skip_watermark=false
|
||||
if [ "$1" = "--skip-watermark" ]; then
|
||||
skip_watermark=true
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
standard = [
|
||||
]
|
||||
|
||||
aur = [
|
||||
"agru",
|
||||
"android-studio",
|
||||
"asciinema-agg",
|
||||
"bluez-qt5",
|
||||
"browseros-bin",
|
||||
"catppuccin-cursors-macchiato",
|
||||
"cuda-12.9",
|
||||
"davs2",
|
||||
"dirb",
|
||||
"discord-bot-client-appimage",
|
||||
"eternalterminal",
|
||||
"game-devices-udev",
|
||||
"gnu-netcat",
|
||||
"google-chrome",
|
||||
"grub-customizer",
|
||||
"gtk-engine-murrine",
|
||||
"joycond-cemuhook-git",
|
||||
"joycond-git",
|
||||
"lib32-gtk2",
|
||||
"pacserve",
|
||||
"rpi-imager-git",
|
||||
"skipfish",
|
||||
"snapd",
|
||||
"ssh-import-id",
|
||||
"superproductivity-bin",
|
||||
"syncthingtray-qt6",
|
||||
"trayscale",
|
||||
"ttf-victor-mono",
|
||||
"varia",
|
||||
"vencord-hook",
|
||||
"vencord-installer-bin",
|
||||
"wallust",
|
||||
"woeusb-ng",
|
||||
"xwaylandvideobridge",
|
||||
]
|
||||
|
||||
flatpak = [
|
||||
]
|
||||
@@ -0,0 +1,318 @@
|
||||
standard = [
|
||||
"accessibility-inspector",
|
||||
"acpi",
|
||||
"adobe-source-code-pro-fonts",
|
||||
"alacritty",
|
||||
"amd-ucode",
|
||||
"android-tools",
|
||||
"android-udev",
|
||||
"ansible",
|
||||
"apache",
|
||||
"ark",
|
||||
"asciinema",
|
||||
"ast-grep",
|
||||
"atomicparsley",
|
||||
"atool",
|
||||
"base",
|
||||
"base-devel",
|
||||
"bat",
|
||||
"bcachefs-tools",
|
||||
"blueman",
|
||||
"bluez-tools",
|
||||
"bluez-utils",
|
||||
"btop",
|
||||
"btrfs-progs",
|
||||
"bully",
|
||||
"cachyos-keyring",
|
||||
"cachyos-mirrorlist",
|
||||
"cachyos-v3-mirrorlist",
|
||||
"cachyos-v4-mirrorlist",
|
||||
"cdrtools",
|
||||
"celt",
|
||||
"cifs-utils",
|
||||
"clamav",
|
||||
"claude-desktop",
|
||||
"cloudflare-warp-bin",
|
||||
"cloudflared",
|
||||
"cmatrix",
|
||||
"code",
|
||||
"cowpatty",
|
||||
"cowsay",
|
||||
"cpio",
|
||||
"cronie",
|
||||
"cython",
|
||||
"dconf-editor",
|
||||
"deskflow",
|
||||
"dialog",
|
||||
"dictd",
|
||||
"discord",
|
||||
"dnsmasq",
|
||||
"docker-buildx",
|
||||
"dolphin-plugins",
|
||||
"dosfstools",
|
||||
"dotnet-sdk-8.0",
|
||||
"downgrade",
|
||||
"dpkg",
|
||||
"efibootmgr",
|
||||
"electron",
|
||||
"element-desktop",
|
||||
"evtest",
|
||||
"exfatprogs",
|
||||
"f2fs-tools",
|
||||
"faac",
|
||||
"faad2",
|
||||
"fastfetch",
|
||||
"fcitx5",
|
||||
"fcitx5-configtool",
|
||||
"fcitx5-gtk",
|
||||
"fcitx5-mozc",
|
||||
"fcitx5-qt",
|
||||
"fd",
|
||||
"ffmpegthumbnailer",
|
||||
"ffmpegthumbs",
|
||||
"figlet",
|
||||
"firefox",
|
||||
"flatpak",
|
||||
"foliate",
|
||||
"foremost",
|
||||
"fortune-mod",
|
||||
"fprintd",
|
||||
"freedownloadmanager",
|
||||
"fuse-overlayfs",
|
||||
"fzf",
|
||||
"ghostty",
|
||||
"git",
|
||||
"glib2-devel",
|
||||
"gnome-2048",
|
||||
"gnome-applets",
|
||||
"gnome-calculator",
|
||||
"gnome-calendar",
|
||||
"gnome-chess",
|
||||
"gnome-clocks",
|
||||
"gnome-disk-utility",
|
||||
"gnome-font-viewer",
|
||||
"gnome-online-accounts",
|
||||
"gnome-power-manager",
|
||||
"gnome-remote-desktop",
|
||||
"gnome-settings-daemon",
|
||||
"gnome-software",
|
||||
"gnome-tweaks",
|
||||
"gnome-weather",
|
||||
"gpart",
|
||||
"gparted",
|
||||
"grub",
|
||||
"gst-plugin-va",
|
||||
"gst-plugins-base",
|
||||
"gst-plugins-ugly",
|
||||
"gst-python",
|
||||
"gufw",
|
||||
"gum",
|
||||
"gvfs",
|
||||
"gvfs-mtp",
|
||||
"gwenview",
|
||||
"hashcat",
|
||||
"hcxdumptool",
|
||||
"hcxtools",
|
||||
"htop",
|
||||
"hyprpolkitagent",
|
||||
"intel-ucode",
|
||||
"inxi",
|
||||
"irssi",
|
||||
"jfsutils",
|
||||
"joyutils",
|
||||
"jre17-openjdk",
|
||||
"julia",
|
||||
"just",
|
||||
"kcachegrind",
|
||||
"kde-inotify-survey",
|
||||
"kdeconnect",
|
||||
"kdenetwork-filesharing",
|
||||
"kdenlive",
|
||||
"kdepim-addons",
|
||||
"kdesdk-thumbnailers",
|
||||
"kimageformats",
|
||||
"kio-admin",
|
||||
"kio-gdrive",
|
||||
"kompare",
|
||||
"konsole",
|
||||
"krdc",
|
||||
"krdp",
|
||||
"kvantum",
|
||||
"kwalletmanager",
|
||||
"lan-mouse",
|
||||
"lazygit",
|
||||
"lib32-blas",
|
||||
"lib32-freeglut",
|
||||
"lib32-lzo",
|
||||
"libc++",
|
||||
"libde265",
|
||||
"libfprint",
|
||||
"libisoburn",
|
||||
"libmp4v2",
|
||||
"libmpcdec",
|
||||
"libreoffice-fresh",
|
||||
"libtorrent",
|
||||
"libva-nvidia-driver",
|
||||
"linux",
|
||||
"linux-firmware",
|
||||
"linux-headers",
|
||||
"localsend",
|
||||
"lolcat",
|
||||
"loupe",
|
||||
"lsd",
|
||||
"luarocks",
|
||||
"lutris",
|
||||
"lxc",
|
||||
"lynx",
|
||||
"macchanger",
|
||||
"magic-wormhole",
|
||||
"mako",
|
||||
"man-db",
|
||||
"memtest86+-efi",
|
||||
"mermaid-cli",
|
||||
"metasploit",
|
||||
"micro",
|
||||
"mingw-w64-tools",
|
||||
"mokutil",
|
||||
"mono",
|
||||
"mousepad",
|
||||
"mplayer",
|
||||
"mpv-mpris",
|
||||
"mtools",
|
||||
"nano",
|
||||
"nautilus",
|
||||
"neofetch",
|
||||
"neovim",
|
||||
"net-tools",
|
||||
"network-manager-applet",
|
||||
"nikto",
|
||||
"nmap",
|
||||
"noto-fonts",
|
||||
"noto-fonts-cjk",
|
||||
"noto-fonts-emoji",
|
||||
"ntfs-3g",
|
||||
"nvidia-580xx-dkms",
|
||||
"nvidia-580xx-settings",
|
||||
"nvtop",
|
||||
"nwg-displays",
|
||||
"nwg-look",
|
||||
"obs-studio",
|
||||
"okular",
|
||||
"ollama",
|
||||
"onlyoffice-bin",
|
||||
"opencode",
|
||||
"os-prober",
|
||||
"otf-font-awesome",
|
||||
"pacman-contrib",
|
||||
"pamixer",
|
||||
"partitionmanager",
|
||||
"pear-desktop",
|
||||
"perl-image-exiftool",
|
||||
"piper",
|
||||
"pipewire-alsa",
|
||||
"plasma-browser-integration",
|
||||
"plocate",
|
||||
"power-profiles-daemon",
|
||||
"poxml",
|
||||
"pwgen",
|
||||
"python-hatchling",
|
||||
"python-installer",
|
||||
"python-pip",
|
||||
"python-pyqt6",
|
||||
"python-pyquery",
|
||||
"python-ufonormalizer",
|
||||
"python-uv",
|
||||
"python-virtualenv",
|
||||
"python-wxpython",
|
||||
"qalculate-gtk",
|
||||
"qbittorrent",
|
||||
"qemu-full",
|
||||
"qt5-quickcontrols2",
|
||||
"qt6ct",
|
||||
"rclone",
|
||||
"reaver",
|
||||
"reflector",
|
||||
"rofi",
|
||||
"rust",
|
||||
"ryujinx",
|
||||
"samba",
|
||||
"sbctl",
|
||||
"sbsigntools",
|
||||
"scdoc",
|
||||
"schroedinger",
|
||||
"scrcpy",
|
||||
"screenfetch",
|
||||
"sddm",
|
||||
"shelly",
|
||||
"shelly-cli",
|
||||
"shelly-flatpak-backend",
|
||||
"shfmt",
|
||||
"sof-firmware",
|
||||
"sox",
|
||||
"spectacle",
|
||||
"sshfs",
|
||||
"steam",
|
||||
"sunshine",
|
||||
"swaync",
|
||||
"syncthing",
|
||||
"syslinux",
|
||||
"tailscale",
|
||||
"tea",
|
||||
"termshark",
|
||||
"texlive-bin",
|
||||
"thunar",
|
||||
"thunar-archive-plugin",
|
||||
"thunar-volman",
|
||||
"thunderbird",
|
||||
"tigervnc",
|
||||
"timeshift",
|
||||
"tmux",
|
||||
"tor",
|
||||
"torbrowser-launcher",
|
||||
"tree",
|
||||
"ttf-droid",
|
||||
"ttf-fantasque-nerd",
|
||||
"ttf-fira-code",
|
||||
"ttf-jetbrains-mono",
|
||||
"tty-clock",
|
||||
"tumbler",
|
||||
"udftools",
|
||||
"uget",
|
||||
"umockdev",
|
||||
"unrar",
|
||||
"uriparser",
|
||||
"usb_modeswitch",
|
||||
"usbguard",
|
||||
"uwsm",
|
||||
"v4l2loopback-dkms",
|
||||
"veracrypt",
|
||||
"virt-manager",
|
||||
"virtualbox",
|
||||
"waybar",
|
||||
"wayvnc",
|
||||
"wgcf",
|
||||
"wifite",
|
||||
"wine",
|
||||
"winetricks",
|
||||
"xarchiver",
|
||||
"xclip",
|
||||
"xdotool",
|
||||
"xfsprogs",
|
||||
"xorg-xhost",
|
||||
"xpadneo-dkms",
|
||||
"yay",
|
||||
"yt-dlp",
|
||||
"zellij",
|
||||
"zen-browser-bin",
|
||||
"zram-generator",
|
||||
"zsh",
|
||||
"zsh-completions",
|
||||
]
|
||||
|
||||
aur = [
|
||||
]
|
||||
|
||||
flatpak = [
|
||||
"org.vinegarhq.Sober",
|
||||
"re.fossplant.songrec",
|
||||
]
|
||||
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
skip_watermark=false
|
||||
if [ "$1" = "--skip-watermark" ]; then
|
||||
skip_watermark=true
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Fixes nwg-displays not auto-updating monitor/workspace configs on hyprctl reload
|
||||
|
||||
+117
-96
@@ -6,6 +6,14 @@ if [ "$1" = "--skip-watermark" ]; then
|
||||
skip_watermark=true
|
||||
fi
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
if [ "$skip_watermark" = false ]; then
|
||||
clear
|
||||
echo '
|
||||
@@ -16,7 +24,7 @@ if [ "$skip_watermark" = false ]; then
|
||||
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||
|___/
|
||||
|
||||
--------------- Single Download script (Stable) ---------------
|
||||
--------------- Single Download script ---------------
|
||||
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
|
||||
@@ -32,63 +40,83 @@ function error_handler() {
|
||||
# Trap errors
|
||||
trap error_handler ERR
|
||||
|
||||
#Install prerequisites
|
||||
sudo pacman -Syu git zsh curl wget libnewt --noconfirm --needed
|
||||
|
||||
# Install shelly as a dependency if not present (Arch-based)
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
||||
# Install build prerequisites for shelly
|
||||
if ! sudo pacman -S --needed --noconfirm base-devel git; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install prerequisite packages for Shelly. You can try running it manually:"
|
||||
echo "sudo pacman -S --needed --noconfirm base-devel git"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Check if shelly binary exists
|
||||
if ! command -v shelly >/dev/null; then
|
||||
echo "shelly is NOT installed. Running installation commands..."
|
||||
if ! git clone https://aur.archlinux.org/shelly.git /tmp/shelly_install; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to clone shelly repository. You can try running it manually:"
|
||||
echo "git clone https://aur.archlinux.org/shelly.git /tmp/shelly_install"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
elif ! (cd /tmp/shelly_install && makepkg -si --noconfirm); then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to build and install shelly. You can try running it manually:"
|
||||
echo "cd /tmp/shelly_install && makepkg -si --noconfirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
cd "$PreviousWD"
|
||||
rm -rf /tmp/shelly_install
|
||||
else
|
||||
echo "Shelly is already installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install prerequisites
|
||||
if command -v shelly >/dev/null; then
|
||||
echo "shelly detected. Installing prerequisites"
|
||||
shelly install standard git zsh curl wget libnewt rsync whiptail --upgrade --no-confirm
|
||||
fi
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing prerequisites"
|
||||
sudo apt update
|
||||
sudo apt full-upgrade -y
|
||||
sudo apt install git zsh curl wget whiptail -y
|
||||
sudo apt install git zsh curl wget whiptail rsync -y
|
||||
fi
|
||||
|
||||
# Ensure whiptail is installed
|
||||
if ! command -v whiptail >/dev/null; then
|
||||
echo "whiptail is not installed. Installing it now..."
|
||||
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
sudo pacman -S whiptail --noconfirm || {
|
||||
if command -v shelly >/dev/null; then
|
||||
echo "shelly detected. Installing whiptail"
|
||||
shelly install standard whiptail --no-confirm || {
|
||||
echo "Failed to install whiptail. Exiting."
|
||||
exit 1
|
||||
}
|
||||
# Reload zsh if it exists
|
||||
if command -v zsh -h >/dev/null; then
|
||||
source ~/.zshrc
|
||||
fi
|
||||
# Reload Bash
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing prerequisites"
|
||||
echo "apt detected. Installing whiptail"
|
||||
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
|
||||
fi
|
||||
# Reload Bash
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Options for the whiptail menu
|
||||
OPTIONS=(
|
||||
1 "Run zsh setup script" ON
|
||||
2 "Run LazyVim setup script" OFF
|
||||
3 "Install Docker" OFF
|
||||
4 "Install Pacman Packages" ON
|
||||
5 "Install Yay and AUR Packages" ON
|
||||
6 "Install affinity with GUI" OFF
|
||||
1 "Run zsh setup script" OFF
|
||||
2 "Run fish setup script" ON
|
||||
3 "Run LazyVim setup script" OFF
|
||||
4 "Install Docker" OFF
|
||||
5 "Install Standard Packages (Shelly)" ON
|
||||
6 "Install AUR Packages (Shelly)" ON
|
||||
7 "Install affinity with GUI" OFF
|
||||
)
|
||||
|
||||
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
||||
@@ -108,7 +136,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..."
|
||||
@@ -121,6 +149,16 @@ for selection in $CHOICE; do
|
||||
fi
|
||||
;;
|
||||
"2")
|
||||
echo "Running fish setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "fish.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash fish.sh --skip-watermark
|
||||
else
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/fish.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"3")
|
||||
echo "Running LazyVim setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "LazyVim.sh" ]]; then
|
||||
@@ -130,7 +168,7 @@ for selection in $CHOICE; do
|
||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
|
||||
fi
|
||||
;;
|
||||
"3")
|
||||
"4")
|
||||
echo "Installing Docker..."
|
||||
if ! command -v docker >/dev/null; then
|
||||
echo "docker is NOT installed. Installing..."
|
||||
@@ -142,86 +180,69 @@ for selection in $CHOICE; do
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"4")
|
||||
echo "Installing Pacman Packages..."
|
||||
# Check if pacman binary is installed
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Cannot proceed: pacman binary not found"
|
||||
"5")
|
||||
echo "Installing Standard Packages via Shelly backup..."
|
||||
# Check if shelly binary is installed
|
||||
if ! command -v shelly >/dev/null; then
|
||||
echo "Cannot proceed: shelly binary not found"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Install pacman packages
|
||||
# Runs local script unless it does not exit or fails
|
||||
if [[ -f "./configs/PackagesPacman.txt" ]]; then
|
||||
echo "Found local config"
|
||||
cat ./configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm; then
|
||||
# Install standard packages from shelly backup
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "./configs/shelly-standard.toml" ]]; then
|
||||
echo "Found local backup"
|
||||
shelly backup --import --name shelly-standard --directory ./configs --no-confirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-standard.toml -o /tmp/shelly-standard.toml; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install Pacman packages. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm"
|
||||
echo "Failed to download shelly backup. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-standard.toml -o /tmp/shelly-standard.toml"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"5")
|
||||
echo "Installing Yay and Yay Packages..."
|
||||
# Check for pacman before installing yay
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Cannot proceed: Not a arch based system"
|
||||
exit 1 # Exit with an error
|
||||
fi
|
||||
# Install yay prerequisites
|
||||
if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl golang fakeroot debugedit make gcc; then
|
||||
elif ! shelly backup --import --name shelly-standard --directory /tmp --no-confirm; 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 golang fakeroot debugedit make gcc"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Check if yay binary exists
|
||||
if ! command -v yay >/dev/null; then
|
||||
echo "yay is NOT installed. Running installation commands..."
|
||||
if ! git clone https://aur.archlinux.org/yay.git /tmp/yay_install; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to clone yay repository. You can try running it manually:"
|
||||
echo "git clone https://aur.archlinux.org/yay.git /tmp/yay_install"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
elif ! (cd /tmp/yay_install && makepkg -si --noconfirm); then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to build and install yay. You can try running it manually:"
|
||||
echo "cd /tmp/yay_install && makepkg -si --noconfirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
cd "$PreviousWD"
|
||||
rm -rf /tmp/yay_install
|
||||
else
|
||||
echo "Yay is already installed."
|
||||
fi
|
||||
# Install yay packages
|
||||
# Runs local script unless it does no exist or fails
|
||||
if [[ -f "./config/PackagesYay.txt" ]]; then
|
||||
echo "Found local config"
|
||||
cat ./config/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install Yay packages. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm"
|
||||
echo "Failed to install Standard packages. You can try running it manually:"
|
||||
echo "shelly backup --import --name shelly-standard --directory /tmp --no-confirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"6")
|
||||
echo "Installing GUI dependencies"
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Pacman found"
|
||||
sudo pacman -S python-pyqt6 --noconfirm --needed
|
||||
echo "Installing AUR Packages via Shelly backup..."
|
||||
# Check for shelly before installing AUR packages
|
||||
if ! command -v shelly >/dev/null; then
|
||||
echo "Cannot proceed: shelly binary not found"
|
||||
exit 1 # Exit with an error
|
||||
fi
|
||||
if command -v dnf </dev/null; then
|
||||
# Install AUR packages from shelly backup
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "./configs/shelly-aur.toml" ]]; then
|
||||
echo "Found local backup"
|
||||
shelly backup --import --name shelly-aur --directory ./configs --no-confirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-aur.toml -o /tmp/shelly-aur.toml; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to download shelly backup. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-aur.toml -o /tmp/shelly-aur.toml"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
elif ! shelly backup --import --name shelly-aur --directory /tmp --no-confirm; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install AUR packages. You can try running it manually:"
|
||||
echo "shelly backup --import --name shelly-aur --directory /tmp --no-confirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"7")
|
||||
echo "Installing GUI dependencies"
|
||||
if command -v shelly >/dev/null; then
|
||||
echo "shelly found"
|
||||
shelly install standard python-pyqt6 --no-confirm
|
||||
fi
|
||||
if command -v dnf >/dev/null; then
|
||||
echo "dnf found"
|
||||
sudo dnf install python3-pyqt6
|
||||
fi
|
||||
if command -v apt </dev/null; then
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt found"
|
||||
sudo apt install python3-pyqt6 -y
|
||||
fi
|
||||
|
||||
+200
-183
@@ -3,12 +3,20 @@
|
||||
PreviousWD=$(pwd)
|
||||
skip_watermark=false
|
||||
if [ "$1" = "--skip-watermark" ]; then
|
||||
skip_watermark=true
|
||||
skip_watermark=true
|
||||
fi
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
if [ "$skip_watermark" = false ]; then
|
||||
clear
|
||||
echo '
|
||||
clear
|
||||
echo '
|
||||
____ _ _ _ _ _
|
||||
| __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___
|
||||
| _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \
|
||||
@@ -16,7 +24,7 @@ echo '
|
||||
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||
|___/
|
||||
|
||||
--------------- Single Download script (Beta) ---------------
|
||||
--------------- Single Download script ---------------
|
||||
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
|
||||
@@ -32,69 +40,95 @@ function error_handler() {
|
||||
# Trap errors
|
||||
trap error_handler ERR
|
||||
|
||||
# Install prerequisites
|
||||
|
||||
# Install shelly as a dependency if not present (Arch-based)
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
sudo pacman -Syu git zsh curl wget libnewt rsync --noconfirm --needed
|
||||
# Install build prerequisites for shelly
|
||||
if ! sudo pacman -S --needed --noconfirm base-devel git; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install prerequisite packages for Shelly. You can try running it manually:"
|
||||
echo "sudo pacman -S --needed --noconfirm base-devel git"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Check if shelly binary exists
|
||||
if ! command -v shelly >/dev/null; then
|
||||
echo "shelly is NOT installed. Running installation commands..."
|
||||
if ! git clone https://aur.archlinux.org/shelly.git /tmp/shelly_install; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to clone shelly repository. You can try running it manually:"
|
||||
echo "git clone https://aur.archlinux.org/shelly.git /tmp/shelly_install"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
elif ! (cd /tmp/shelly_install && makepkg -si --noconfirm); then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to build and install shelly. You can try running it manually:"
|
||||
echo "cd /tmp/shelly_install && makepkg -si --noconfirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
cd "$PreviousWD"
|
||||
rm -rf /tmp/shelly_install
|
||||
else
|
||||
echo "Shelly is already installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install prerequisites
|
||||
if command -v shelly >/dev/null; then
|
||||
echo "shelly detected. Installing prerequisites"
|
||||
shelly install standard git zsh curl wget libnewt rsync whiptail --upgrade --no-confirm
|
||||
fi
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing prerequisites"
|
||||
sudo apt update
|
||||
sudo apt full-upgrade -y
|
||||
sudo apt install git zsh curl wget whiptail rsync -y
|
||||
echo "apt detected. Installing prerequisites"
|
||||
sudo apt update
|
||||
sudo apt full-upgrade -y
|
||||
sudo apt install git zsh curl wget whiptail rsync -y
|
||||
fi
|
||||
|
||||
# Ensure whiptail is installed
|
||||
if ! command -v whiptail >/dev/null; then
|
||||
echo "whiptail is not installed. Installing it now..."
|
||||
echo "whiptail is not installed. Installing it now..."
|
||||
|
||||
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; }
|
||||
# Reload zsh if it exists
|
||||
if command -v zsh -h >/dev/null; then
|
||||
source ~/.zshrc
|
||||
fi
|
||||
# Reload Bash
|
||||
source ~/.bashrc
|
||||
fi
|
||||
if command -v shelly >/dev/null; then
|
||||
echo "shelly detected. Installing whiptail"
|
||||
shelly install standard whiptail --no-confirm || {
|
||||
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; }
|
||||
# Reload zsh if it exists
|
||||
if command -v zsh -h >/dev/null; then
|
||||
source ~/.zshrc
|
||||
fi
|
||||
# Reload Bash
|
||||
source ~/.bashrc
|
||||
fi
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing whiptail"
|
||||
sudo apt install whiptail -y || {
|
||||
echo "Failed to install whiptail. Exiting."
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Options for the whiptail menu
|
||||
OPTIONS=(
|
||||
1 "Run zsh setup script" OFF
|
||||
2 "Run fish setup script (NOT CREATED)" ON
|
||||
3 "Run LazyVim setup script" OFF
|
||||
4 "Install Docker" OFF
|
||||
5 "Install Pacman Packages" ON
|
||||
6 "Install Yay and AUR Packages" ON
|
||||
7 "Install affinity with GUI" OFF
|
||||
1 "Run zsh setup script" OFF
|
||||
2 "Run fish setup script" ON
|
||||
3 "Run LazyVim setup script" OFF
|
||||
4 "Install Docker" OFF
|
||||
5 "Install Standard Packages (Shelly)" ON
|
||||
6 "Install AUR Packages (Shelly)" ON
|
||||
7 "Install affinity with GUI" OFF
|
||||
)
|
||||
|
||||
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
||||
"Choose components to install:" 20 78 10 \
|
||||
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||
"Choose components to install:" 20 78 10 \
|
||||
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||
|
||||
exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo "User selected: $CHOICE"
|
||||
echo "User selected: $CHOICE"
|
||||
else
|
||||
echo "User cancelled installation."
|
||||
exit 1
|
||||
echo "User cancelled installation."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Fail on any command.
|
||||
@@ -102,144 +136,127 @@ set -eu pipefail
|
||||
|
||||
# Process selected options
|
||||
for selection in $CHOICE; do
|
||||
clean_selection=$(echo $selection | tr -d '"')
|
||||
case $clean_selection in
|
||||
"1")
|
||||
echo "Running zsh setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "zsh.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash zsh.sh --skip-watermark
|
||||
else
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"2")
|
||||
echo "Running fish setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "fish.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash fish.sh --skip-watermark
|
||||
else
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/fish.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"3")
|
||||
echo "Running LazyVim setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "LazyVim.sh" ]];then
|
||||
echo "Found local script, running..."
|
||||
bash LazyVim.sh
|
||||
else
|
||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
|
||||
fi
|
||||
;;
|
||||
"4")
|
||||
echo "Installing Docker..."
|
||||
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
|
||||
else
|
||||
sudo usermod -aG docker $USER
|
||||
echo "Docker is already installed."
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"5")
|
||||
echo "Installing Pacman Packages..."
|
||||
# Check if pacman binary is installed
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Cannot proceed: pacman binary not found"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Install pacman packages
|
||||
# Runs local script unless it does not exit or fails
|
||||
if [[ -f "./configs/PackagesPacman.txt" ]]; then
|
||||
echo "Found local config"
|
||||
cat ./configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install Pacman packages. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"6")
|
||||
echo "Installing Yay and Yay Packages..."
|
||||
# Check for pacman before installing yay
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Cannot proceed: Not a arch based system"
|
||||
exit 1 # Exit with an error
|
||||
fi
|
||||
# Install yay prerequisites
|
||||
if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl golang fakeroot debugedit make gcc; 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 golang fakeroot debugedit make gcc"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Check if yay binary exists
|
||||
if ! command -v yay >/dev/null; then
|
||||
echo "yay is NOT installed. Running installation commands..."
|
||||
if ! git clone https://aur.archlinux.org/yay.git /tmp/yay_install; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to clone yay repository. You can try running it manually:"
|
||||
echo "git clone https://aur.archlinux.org/yay.git /tmp/yay_install"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
elif ! (cd /tmp/yay_install && makepkg -si --noconfirm); then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to build and install yay. You can try running it manually:"
|
||||
echo "cd /tmp/yay_install && makepkg -si --noconfirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
cd $PreviousWD
|
||||
rm -rf /tmp/yay_install
|
||||
else
|
||||
echo "Yay is already installed."
|
||||
fi
|
||||
# Install yay packages
|
||||
# Runs local script unless it does no exist or fails
|
||||
if [[ -f "./config/PackagesYay.txt" ]]; then
|
||||
echo "Found local config"
|
||||
cat ./config/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install Yay packages. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"7")
|
||||
echo "Installing GUI dependencies"
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Pacman found"
|
||||
sudo pacman -S python-pyqt6 --noconfirm --needed
|
||||
fi
|
||||
if command -v dnf </dev/null; then
|
||||
echo "dnf found"
|
||||
sudo dnf install python3-pyqt6
|
||||
fi
|
||||
if command -v apt </dev/null; then
|
||||
echo "apt found"
|
||||
sudo apt install python3-pyqt6 -y
|
||||
fi
|
||||
echo "Install affinity with ryzendew's gui installer"
|
||||
echo "You must manually select to install in the GUI"
|
||||
echo "Github repo: https://github.com/ryzendew/Linux-Affinity-Installer"
|
||||
echo "+ 10 sleep"
|
||||
sleep 10
|
||||
curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option selected: $selection"
|
||||
;;
|
||||
esac
|
||||
clean_selection=$(echo "$selection" | tr -d '"')
|
||||
case $clean_selection in
|
||||
"1")
|
||||
echo "Running zsh setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "zsh.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash zsh.sh --skip-watermark
|
||||
else
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"2")
|
||||
echo "Running fish setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "fish.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash fish.sh --skip-watermark
|
||||
else
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/fish.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"3")
|
||||
echo "Running LazyVim setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "LazyVim.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash LazyVim.sh
|
||||
else
|
||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
|
||||
fi
|
||||
;;
|
||||
"4")
|
||||
echo "Installing Docker..."
|
||||
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"
|
||||
else
|
||||
sudo usermod -aG docker "$USER"
|
||||
echo "Docker is already installed."
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"5")
|
||||
echo "Installing Standard Packages via Shelly backup..."
|
||||
# Check if shelly binary is installed
|
||||
if ! command -v shelly >/dev/null; then
|
||||
echo "Cannot proceed: shelly binary not found"
|
||||
exit 1 # exit with an error
|
||||
fi
|
||||
# Install standard packages from shelly backup
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "./configs/shelly-standard.toml" ]]; then
|
||||
echo "Found local backup"
|
||||
shelly backup --import --name shelly-standard --directory ./configs --no-confirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-standard.toml -o /tmp/shelly-standard.toml; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to download shelly backup. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-standard.toml -o /tmp/shelly-standard.toml"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
elif ! shelly backup --import --name shelly-standard --directory /tmp --no-confirm; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install Standard packages. You can try running it manually:"
|
||||
echo "shelly backup --import --name shelly-standard --directory /tmp --no-confirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"6")
|
||||
echo "Installing AUR Packages via Shelly backup..."
|
||||
# Check for shelly before installing AUR packages
|
||||
if ! command -v shelly >/dev/null; then
|
||||
echo "Cannot proceed: shelly binary not found"
|
||||
exit 1 # Exit with an error
|
||||
fi
|
||||
# Install AUR packages from shelly backup
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "./configs/shelly-aur.toml" ]]; then
|
||||
echo "Found local backup"
|
||||
shelly backup --import --name shelly-aur --directory ./configs --no-confirm
|
||||
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-aur.toml -o /tmp/shelly-aur.toml; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to download shelly backup. You can try running it manually:"
|
||||
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/shelly-aur.toml -o /tmp/shelly-aur.toml"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
elif ! shelly backup --import --name shelly-aur --directory /tmp --no-confirm; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "Failed to install AUR packages. You can try running it manually:"
|
||||
echo "shelly backup --import --name shelly-aur --directory /tmp --no-confirm"
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"7")
|
||||
echo "Installing GUI dependencies"
|
||||
if command -v shelly >/dev/null; then
|
||||
echo "shelly found"
|
||||
shelly install standard python-pyqt6 --no-confirm
|
||||
fi
|
||||
if command -v dnf >/dev/null; then
|
||||
echo "dnf found"
|
||||
sudo dnf install python3-pyqt6
|
||||
fi
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt found"
|
||||
sudo apt install python3-pyqt6 -y
|
||||
fi
|
||||
echo "Install affinity with ryzendew's gui installer"
|
||||
echo "You must manually select to install in the GUI"
|
||||
echo "Github repo: https://github.com/ryzendew/Linux-Affinity-Installer"
|
||||
echo "+ 10 sleep"
|
||||
sleep 10
|
||||
curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option selected: $selection"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Installation process complete."
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Detect fish shell and ask user to switch to bash (bash-only syntax)
|
||||
if [ -n "${FISH_VERSION:-}" ] || case "$SHELL" in *fish*) ;; *) false ;; esac; then
|
||||
echo "Warning: fish shell detected."
|
||||
echo "This script is written for bash and may have syntax issues under fish."
|
||||
echo "Please switch to bash first and re-run it, e.g.: bash $0"
|
||||
read -r -p "Press Enter to continue anyway, or Ctrl+C to cancel..." </dev/tty || true
|
||||
fi
|
||||
|
||||
skip_watermark=false
|
||||
if [ "$1" = "--skip-watermark" ]; then
|
||||
skip_watermark=true
|
||||
@@ -116,14 +124,14 @@ echo "Changing your shell to $zsh..."
|
||||
|
||||
if ! echo "+ sudo -k chsh -s "$zsh" "$USER"" && sudo -k chsh -s "$zsh" "$USER"; then # -k forces password prompt
|
||||
echo "Next command may fail."
|
||||
echo "+ chsh -s $"(which zsh)" "$USER""
|
||||
chsh -s $"(which zsh)" "$USER" # run chsh normally may fail
|
||||
echo "+ chsh -s \"$(which zsh)\" \"$USER\""
|
||||
chsh -s "$(which zsh)" "$USER" # run chsh normally may fail
|
||||
fi
|
||||
|
||||
# Check if the shell change was successful
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "chsh command unsuccessful. Change your default shell manually:"
|
||||
echo "chsh -s $"(which zsh)" "$USER""
|
||||
echo "chsh -s \"$(which zsh)\" \"$USER\""
|
||||
else
|
||||
export SHELL="$zsh"
|
||||
echo "Shell successfully changed to '$zsh'."
|
||||
|
||||
Reference in New Issue
Block a user