Update debian/setup-debian.sh
This commit is contained in:
parent
7545e3fdd7
commit
f2d05be42d
1 changed files with 96 additions and 59 deletions
155
debian/setup-debian.sh
vendored
155
debian/setup-debian.sh
vendored
|
@ -1,72 +1,109 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
$INTERACTION_MODE=0
|
||||
|
||||
# Check if running as root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Add contrib, non-free and non-free-firmware to the sources
|
||||
config_sources () {
|
||||
echo "INFO: ####################### Add contrib, non-free and non-free-firmware to the sources #######################"
|
||||
interactive
|
||||
cat << END_OF_FILE > /etc/apt/sources.list
|
||||
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||
deb-src https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||
|
||||
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
||||
deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
||||
|
||||
deb https://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
|
||||
deb-src https://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
|
||||
END_OF_FILE
|
||||
}
|
||||
|
||||
# Add multi-arch support
|
||||
config_multi-arch () {
|
||||
echo "INFO: ####################### Add multi-arch support #######################"
|
||||
interactive
|
||||
dpkg --add-architecture i386
|
||||
}
|
||||
|
||||
# Update apt sources
|
||||
update_sources () {
|
||||
echo "INFO: ####################### Update apt sources #######################"
|
||||
interactive
|
||||
apt-get update
|
||||
}
|
||||
# Upgrade upgradeable packages
|
||||
upgrade_packages () {
|
||||
echo "INFO: ####################### Upgrade upgradeable packages #######################"
|
||||
interactive
|
||||
apt-get upgrade --yes
|
||||
}
|
||||
|
||||
# Install packages
|
||||
install_packages () {
|
||||
echo "INFO: ####################### Install packages #######################"
|
||||
interactive
|
||||
apt-get install --yes gnome-core gnome-connections gnome-text-editor gnome-disk-utility gnome-passwordsafe gnome-feeds vim curl chromium dropbear dropbear-initramfs steam-installer wine wine64 protontricks pcsx2 openjdk-17-jre flatpak gnome-software-plugin-flatpak git python3 python3-venv qemu-kvm virt-manager nvidia-driver tmux apostrophe
|
||||
}
|
||||
# Install Proton-GE
|
||||
install_proton-ge () {
|
||||
echo "INFO: ####################### Install Proton-GE #######################"
|
||||
interactive
|
||||
wget -q -O - https://git.adrianux.net/ahoemann/Setup-Scripts/raw/branch/main/proton/proton-ge-setup.sh | bash
|
||||
}
|
||||
# Setup Flatpaks
|
||||
setup_flatpaks () {
|
||||
echo "INFO: ####################### Setup Flatpak #######################"
|
||||
interactive
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --assumeyes --noninteractive flathub org.telegram.desktop flathub com.usebottles.bottles
|
||||
flatpak override --filesystem=host
|
||||
}
|
||||
# Install NordVPN
|
||||
install_nordvpn () {
|
||||
echo "INFO: ####################### Install NordVPN #######################"
|
||||
interactive
|
||||
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
|
||||
}
|
||||
# Install Internet Archive CLI
|
||||
install_ia-cli () {
|
||||
echo "INFO: ####################### Install Internet Archive CLI #######################"
|
||||
interactive
|
||||
wget https://archive.org/download/ia-pex/ia -o /tmp/ia
|
||||
chmod +x /tmp/ia
|
||||
mv /tmp/ia /usr/bin/ia
|
||||
}
|
||||
|
||||
main () {
|
||||
config_sources
|
||||
config_multi-arch
|
||||
update_sources
|
||||
upgrade_packages
|
||||
install_packages
|
||||
install_proton-ge
|
||||
setup_flatpaks
|
||||
install_nordvpn
|
||||
install_ia-cli
|
||||
}
|
||||
|
||||
if [ $1 == "-i" ]; then
|
||||
$INTERACTION_MODE="-i"
|
||||
elif [ -z $1 ]; then
|
||||
$1
|
||||
else
|
||||
main
|
||||
fi
|
||||
|
||||
# Check if running in interactive mode
|
||||
interactive () {
|
||||
if [ $1 -eq "-i" ];then
|
||||
if [ $INTERACTION_MODE -eq "-i" ];then
|
||||
echo "INFO: ctrl+c to stop the script"
|
||||
read -p "Press any key to start the current step..."
|
||||
fi
|
||||
}
|
||||
|
||||
# Add contrib, non-free and non-free-firmware to the sources
|
||||
echo "INFO: ####################### Add contrib, non-free and non-free-firmware to the sources #######################"
|
||||
interactive
|
||||
cat << END_OF_FILE > /etc/apt/sources.list
|
||||
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||
deb-src https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||
|
||||
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
||||
deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
||||
|
||||
deb https://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
|
||||
deb-src https://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
|
||||
END_OF_FILE
|
||||
|
||||
# Add multi-arch support
|
||||
echo "INFO: ####################### Add multi-arch support #######################"
|
||||
interactive
|
||||
dpkg --add-architecture i386
|
||||
|
||||
# Update apt sources
|
||||
echo "INFO: ####################### Update apt sources #######################"
|
||||
interactive
|
||||
apt-get update
|
||||
|
||||
# Upgrade upgradeable packages
|
||||
echo "INFO: ####################### Upgrade upgradeable packages #######################"
|
||||
interactive
|
||||
apt-get upgrade --yes
|
||||
|
||||
# Install packages
|
||||
echo "INFO: ####################### Install packages #######################"
|
||||
interactive
|
||||
apt-get install --yes gnome-core gnome-connections gnome-text-editor gnome-disk-utility gnome-passwordsafe gnome-feeds vim curl chromium dropbear dropbear-initramfs steam-installer wine wine64 protontricks pcsx2 openjdk-17-jre flatpak gnome-software-plugin-flatpak git python3 python3-venv qemu-kvm virt-manager nvidia-driver tmux apostrophe
|
||||
|
||||
# Install Proton-GE
|
||||
echo "INFO: ####################### Install Proton-GE #######################"
|
||||
interactive
|
||||
wget -q -O - https://git.adrianux.net/ahoemann/Setup-Scripts/raw/branch/main/proton/proton-ge-setup.sh | bash
|
||||
|
||||
# Setup Flatpak repo
|
||||
echo "INFO: ####################### Setup Flatpak repo #######################"
|
||||
interactive
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --assumeyes --noninteractive flathub org.telegram.desktop flathub com.usebottles.bottles
|
||||
flatpak override --filesystem=host
|
||||
|
||||
# Install NordVPN
|
||||
echo "INFO: ####################### Install NordVPN #######################"
|
||||
interactive
|
||||
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
|
||||
|
||||
# Install Internet Archive CLI
|
||||
echo "INFO: ####################### Install Internet Archive CLI #######################"
|
||||
interactive
|
||||
wget https://archive.org/download/ia-pex/ia -o /tmp/ia
|
||||
chmod +x /tmp/ia
|
||||
mv /tmp/ia /usr/bin/ia
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue