Update install.sh
This commit is contained in:
105
install.sh
105
install.sh
@@ -2,8 +2,8 @@
|
||||
#
|
||||
# Qtile - Debian install - Martin - ITmail.dk
|
||||
# nano qtile-install.sh && chmod +x qtile-install.sh && ./qtile-install.sh
|
||||
# bash -c "$(wget -O- http://192.168.18.34:3005/mara/made-install/raw/branch/main/install.sh)"
|
||||
# sudo apt install -y git && git clone http://192.168.18.34:3005/mara/made-install.git && cd made-install && . install.sh
|
||||
# bash -c "$(wget -O- http://git.local:3005/mara/m.a.d.e/raw/branch/main/install.sh)"
|
||||
# sudo apt install -y git && git clone http://git.local:3005/mara/m.a.d.e.git && cd m.a.d.e && . install.sh
|
||||
|
||||
# Resource links to source
|
||||
# https://qtile.org
|
||||
@@ -95,6 +95,7 @@ clear
|
||||
|
||||
# Installation start screen
|
||||
FULLUSERNAME=$(awk -v user="$USER" -F":" 'user==$1{print $5}' /etc/passwd)
|
||||
|
||||
if (whiptail --title "Installation of the Martin Qtile Desktop" --yesno "Hi $FULLUSERNAME do you want to start \nThe M.A.D.E installation ?" 10 50); then
|
||||
echo -e "${GREEN} Okay, let's start the installation"
|
||||
else
|
||||
@@ -102,46 +103,23 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Install choice questions yes-no
|
||||
questions=("Do you want to install Kitty terminal or use XTerm" \
|
||||
"Is this a laptop we are installing on!" \
|
||||
"Install XRDP Remote desktop" \
|
||||
"Install Thunar file manager" \
|
||||
"Install Google Chrome" \
|
||||
"Install SMB/CIFS Storage Client" \
|
||||
"Install NFS Storage Client" \
|
||||
"Install Ceph Storage Client" \
|
||||
"Install Neovim Text Editor" \
|
||||
"Install VS Code Editor" \
|
||||
)
|
||||
echo -e "${YELLOW} Install selection choose what to install Start ${NC}"
|
||||
|
||||
commands=("sudo apt install -y kitty" \
|
||||
"sudo apt install -y tlp tlp-rdw" \
|
||||
"sudo apt install -y xrdp && sudo systemctl restart xrdp.service" \
|
||||
"sudo apt install -y thunar" \
|
||||
"cd /tmp/ && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install -y /tmp/google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb" \
|
||||
"sudo apt install -y smbclient" \
|
||||
"sudo apt install -y nfs-common" \
|
||||
"sudo apt install -y ceph-commen" \
|
||||
"sudo apt install -y neovim" \
|
||||
"cd /tmp/ && wget -O vscode_amd64.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' && sudo apt install -y /tmp/vscode_amd64.deb && rm vscode_amd64.deb && cd ~" \
|
||||
)
|
||||
PROGRAMS=$(whiptail --title "The Install selection" --checklist --separate-output \
|
||||
"Choose what to install:" 20 78 15 \
|
||||
"1" "Do you want to install Kitty terminal or use XTerm" ON \
|
||||
"2" "Is this a laptop we are installing on!" OFF \
|
||||
"3" "Install XRDP Remote desktop" OFF \
|
||||
"4" "Install Thunar file manager" ON \
|
||||
"5" "Install Google Chrome" ON \
|
||||
"6" "Install Neovim Text Editor" ON \
|
||||
"7" "Install VS Code Editor" OFF \
|
||||
"8" "Install SMB/CIFS Storage Client" ON \
|
||||
"9" "Install NFS Storage Client" OFF \
|
||||
"10" "Install Ceph Storage Client" OFF 3>&1 1>&2 2>&3)
|
||||
|
||||
# Array to store install user choices
|
||||
choices=()
|
||||
# See the actual installation below - Install selection choose what to install End
|
||||
|
||||
# Loop through questions
|
||||
for i in "${!questions[@]}"; do
|
||||
# Display the question using whiptail
|
||||
choice=$(whiptail --title "Question $((i+1))" --yesno "${questions[$i]}" 10 60 3>&1 1>&2 2>&3)
|
||||
|
||||
# Check the exit status of whiptail
|
||||
if [ $? -eq 0 ]; then
|
||||
choices+=("yes")
|
||||
else
|
||||
choices+=("no")
|
||||
fi
|
||||
done
|
||||
|
||||
clear
|
||||
echo -e "${RED} "
|
||||
@@ -167,7 +145,7 @@ sudo apt update
|
||||
echo -e "${YELLOW} Core System APT install ${NC}"
|
||||
sudo apt install -y xserver-xorg x11-utils xinit arandr autorandr picom fwupd mesa-utils htop wget curl git tmux numlockx cups xsensors xbacklight brightnessctl unzip network-manager dunst libnotify-bin notify-osd xautolock xsecurelock pm-utils rofi fontconfig fontconfig-config fonts-dejavu-core libfontconfig1 fonts-arkpandora
|
||||
sudo apt install -y sddm --no-install-recommends
|
||||
# sudo apt install -y feh
|
||||
|
||||
sudo apt install -y nitrogen nsxiv mpv flameshot speedcrunch mc gvfs-backends mpd mpc ncmpcpp fzf xarchiver
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
@@ -219,10 +197,12 @@ echo -e "${YELLOW} CPU Microcode install END ${NC}"
|
||||
echo -e "${YELLOW} Alias echo to ~/.bashrc ${NC}"
|
||||
echo 'alias ls="ls --color=auto --group-directories-first -v -lah"' >> ~/.bashrc
|
||||
echo 'alias upup="sudo apt update && sudo apt upgrade -y && sudo apt clean && sudo apt autoremove -y"' >> ~/.bashrc
|
||||
echo 'bind '"'"'"\C-f":"open "$(fzf)"\n"'"'" >> ~/.bashrc
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
echo -e "${YELLOW} Qtile Core Dependencies apt install ${NC}"
|
||||
sudo apt install -y python3-pip python3-xcffib python3-cairocffi python3-cffi libpangocairo-1.0-0 python-dbus-dev libxkbcommon-dev libxkbcommon-x11-dev python3-venv python3-psutil
|
||||
sudo apt install -y python3-pip python3-xcffib python3-cairocffi python3-cffi libpangocairo-1.0-0 python-dbus-dev libxkbcommon-dev libxkbcommon-x11-dev python3-venv python3-psutil feh
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
echo -e "${YELLOW} Set User folders via xdg-user-dirs-update. ${NC}"
|
||||
@@ -2265,19 +2245,44 @@ sudo sed -i 's+GRUB_TIMEOUT=5+GRUB_TIMEOUT=1+g' /etc/default/grub && sudo update
|
||||
echo -e "${YELLOW} Edit GRUB BOOT TIMEOUT END ${NC}"
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
# Execute the commands based on user choices
|
||||
for i in "${!choices[@]}"; do
|
||||
case ${choices[$i]} in
|
||||
"yes" )
|
||||
echo "Executing $((i+1))..."
|
||||
# The command field is replaced with the correct command to be executed
|
||||
eval "${commands[$i]}"
|
||||
echo -e "${YELLOW} Install selection choose what to install Start ${NC}"
|
||||
for PROGRAM in $PROGRAMS
|
||||
do
|
||||
case $PROGRAM in
|
||||
"1")
|
||||
sudo apt install -y kitty
|
||||
;;
|
||||
"no" )
|
||||
echo "Skipping $((i+1))."
|
||||
"2")
|
||||
sudo apt install -y tlp tlp-rdw
|
||||
;;
|
||||
"3")
|
||||
sudo apt install -y xrdp && sudo systemctl restart xrdp.service
|
||||
;;
|
||||
"4")
|
||||
sudo apt install -y thunar
|
||||
;;
|
||||
"5")
|
||||
cd /tmp/ && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install -y /tmp/google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb
|
||||
;;
|
||||
"6")
|
||||
sudo apt install -y neovim
|
||||
;;
|
||||
"7")
|
||||
cd /tmp/ && wget -O vscode_amd64.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' && sudo apt install -y /tmp/vscode_amd64.deb && rm vscode_amd64.deb && cd ~
|
||||
;;
|
||||
"8")
|
||||
sudo apt install -y smbclient
|
||||
;;
|
||||
"9")
|
||||
sudo apt install -y nfs-common
|
||||
;;
|
||||
"10")
|
||||
sudo apt install -y ceph-commen
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
echo -e "${YELLOW} Install selection choose what to install End ${NC}"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user