mirror of
https://github.com/alvinlollo/Single-install-script.git
synced 2026-06-30 16:10:29 +10:00
Update installbeta.sh
This commit is contained in:
+19
-18
@@ -15,8 +15,8 @@ echo '
|
|||||||
--------------- Single Download script ---------------
|
--------------- Single Download script ---------------
|
||||||
'
|
'
|
||||||
|
|
||||||
# Install prequisites
|
# Install prerequisites
|
||||||
echo "Install prequisites"
|
echo "Install prerequisites"
|
||||||
echo
|
echo
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y git zsh curl git build-essential whiptail
|
sudo apt install -y git zsh curl git build-essential whiptail
|
||||||
@@ -29,24 +29,23 @@ sudo apt full-upgrade -y
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# Build whiptail command
|
# Build whiptail command
|
||||||
|
|
||||||
whiptail_command=(
|
whiptail_command=(
|
||||||
whiptail --title "Select Options" --checklist "Choose options to install" 28 85 20
|
whiptail --title "Select Options" --checklist "Choose options to install" 28 85 20
|
||||||
)
|
)
|
||||||
|
|
||||||
whiptail_command+=(
|
whiptail_command+=(
|
||||||
"Homebrew" "Installs homebrew using the install script" "OFF"
|
"homebrew" "Installs homebrew using the install script" "OFF"
|
||||||
"Oh-My-Zsh" "Installs Oh-My-Zsh with plugins and configurations" "ON"
|
"ohmyzsh" "Installs Oh-My-Zsh with plugins and configurations" "ON"
|
||||||
"GEF" "Installs GEF (https://github.com/hugsy/gef/)" "OFF"
|
"gef" "Installs GEF (https://github.com/hugsy/gef/)" "OFF"
|
||||||
"apt Packages" "Installs packages and utilities" "ON"
|
"apt_packages" "Installs packages and utilities" "ON"
|
||||||
"Casa Os" "Installs CasaOs using the install script" "OFF"
|
"casaos" "Installs CasaOs using the install script" "OFF"
|
||||||
"Docker" "Installs Docker with install script" "OFF"
|
"docker" "Installs Docker with install script" "OFF"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Function to get user selections
|
# Function to get user selections
|
||||||
get_user_selection() {
|
get_user_selection() {
|
||||||
local selections
|
local selections
|
||||||
selections=$(whiptail "${whiptail_command[@]}" --output-fd 3 3>&1 1>&2 2>&1)
|
selections=$(whiptail "${whiptail_command[@]}" --output-fd 3 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "INFO No options selected. Exiting."
|
echo "INFO No options selected. Exiting."
|
||||||
@@ -62,14 +61,14 @@ execute_commands() {
|
|||||||
|
|
||||||
for option in "${options[@]}"; do
|
for option in "${options[@]}"; do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
"Homebrew")
|
"homebrew")
|
||||||
echo "INFO Executing commands for Homebrew"
|
echo "INFO Executing commands for Homebrew"
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
brew update
|
brew update
|
||||||
brew upgrade
|
brew upgrade
|
||||||
brew install fzf gcc eza thefuck gh
|
brew install fzf gcc eza thefuck gh
|
||||||
;;
|
;;
|
||||||
"Oh-My-Zsh")
|
"ohmyzsh")
|
||||||
echo "INFO Executing commands for Oh-My-Zsh"
|
echo "INFO Executing commands for Oh-My-Zsh"
|
||||||
sudo apt install zsh fzf -y
|
sudo apt install zsh fzf -y
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
@@ -82,6 +81,7 @@ execute_commands() {
|
|||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||||
|
|
||||||
echo "INFO Configuring Oh-MyZsh"
|
echo "INFO Configuring Oh-MyZsh"
|
||||||
|
|
||||||
# Backup old config file if it exists
|
# Backup old config file if it exists
|
||||||
cp .zshrc .zshrc.backup
|
cp .zshrc .zshrc.backup
|
||||||
|
|
||||||
@@ -94,20 +94,21 @@ execute_commands() {
|
|||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
;;
|
;;
|
||||||
"GEF")
|
"gef")
|
||||||
echo "INFO Executing commands for GEF"
|
echo "INFO Executing commands for GEF"
|
||||||
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
|
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
|
||||||
;;
|
;;
|
||||||
"apt Packages")
|
"apt_packages")
|
||||||
echo "INFO Executing commands for apt Packages"
|
echo "INFO Executing commands for apt Packages"
|
||||||
sudo apt install -y python3 python3-pip git htop golang figlet irssi cmatrix neofetch cowsay fortune-mod tint smartmontools udevil samba cifs-utils mergerfs tty-clock lolcat libsass1 dpkg npm python3 needrestart lynx wget curl zsh net-tools network-manager tmux --fix-missing
|
sudo apt install -y python3 python3-pip git htop golang figlet irssi cmatrix neofetch cowsay fortune-mod tint smartmontools udevil samba cifs-utils mergerfs tty-clock lolcat libsass1 dpkg npm python3 needrestart lynx wget curl zsh net-tools network-manager tmux --fix-missing
|
||||||
;;
|
;;
|
||||||
"Casa Os")
|
"casaos")
|
||||||
echo "INFO Executing commands for Casa Os"
|
echo "INFO Executing commands for Casa Os"
|
||||||
curl -fsSL https://get.casaos.io | sudo bash
|
curl -fsSL https://get.casaos.io | sudo bash
|
||||||
;;
|
;;
|
||||||
"Docker")
|
"docker")
|
||||||
curl -fsSL https://test.docker.com | sh
|
echo "INFO Executing commands for Docker"
|
||||||
|
curl -fsSL https://get.docker.com | sh
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WARN Unknown option: $option"
|
echo "WARN Unknown option: $option"
|
||||||
@@ -122,7 +123,7 @@ echo "INFO Starting the installation process..."
|
|||||||
# Get user selections
|
# Get user selections
|
||||||
selected_options=$(get_user_selection)
|
selected_options=$(get_user_selection)
|
||||||
|
|
||||||
# Convert selected options into an array (splitting by spaces)
|
# Convert selected options into an array (splitting by newline)
|
||||||
IFS='\n' read -r -a options <<< "$selected_options"
|
IFS='\n' read -r -a options <<< "$selected_options"
|
||||||
|
|
||||||
# Execute commands based on selections
|
# Execute commands based on selections
|
||||||
|
|||||||
Reference in New Issue
Block a user