mirror of
https://github.com/alvinlollo/Single-install-script.git
synced 2026-07-09 18:12:47 +10:00
Update installbeta.sh
This commit is contained in:
+9
-17
@@ -28,14 +28,6 @@ echo
|
|||||||
sudo apt full-upgrade -y
|
sudo apt full-upgrade -y
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Define colors for output
|
|
||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
|
||||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
|
||||||
RESET="$(tput sgr0)"
|
|
||||||
|
|
||||||
# Function to present options and get user selection
|
# Function to present options and get user selection
|
||||||
get_user_selection() {
|
get_user_selection() {
|
||||||
local options=("Homebrew" "Oh-My-Zsh" "GEF" "apt Packages" "Casa Os" "Docker")
|
local options=("Homebrew" "Oh-My-Zsh" "GEF" "apt Packages" "Casa Os" "Docker")
|
||||||
@@ -68,7 +60,7 @@ get_user_selection() {
|
|||||||
local result=$?
|
local result=$?
|
||||||
|
|
||||||
if [ "$result" -ne 0 ]; then
|
if [ "$result" -ne 0 ]; then
|
||||||
echo "${INFO} No options selected. Exiting."
|
echo "INFO No options selected. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -87,14 +79,14 @@ execute_commands() {
|
|||||||
for option in "${selected_options[@]}"; do
|
for option in "${selected_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")
|
"Oh-My-Zsh")
|
||||||
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)"
|
||||||
|
|
||||||
@@ -105,7 +97,7 @@ execute_commands() {
|
|||||||
git clone --depth 1 https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin
|
git clone --depth 1 https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin
|
||||||
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
|
||||||
|
|
||||||
@@ -119,15 +111,15 @@ execute_commands() {
|
|||||||
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")
|
"Casa Os")
|
||||||
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")
|
||||||
@@ -141,7 +133,7 @@ execute_commands() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Main script logic
|
# Main script logic
|
||||||
echo "${INFO} Starting the installation process..."
|
echo "INFO Starting the installation process..."
|
||||||
|
|
||||||
# Get user selections
|
# Get user selections
|
||||||
selected_options=$(get_user_selection)
|
selected_options=$(get_user_selection)
|
||||||
@@ -149,6 +141,6 @@ selected_options=$(get_user_selection)
|
|||||||
# Execute commands based on selections
|
# Execute commands based on selections
|
||||||
execute_commands $selected_options
|
execute_commands $selected_options
|
||||||
|
|
||||||
echo "${INFO} Installation process completed."
|
echo "INFO Installation process completed."
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user