Finally move to package-list instead of variables

This commit is contained in:
RealStickman 2021-03-15 13:59:25 +01:00
parent fc798c9b1d
commit 1ac2af277e

View File

@ -10,8 +10,8 @@ setupdir=$(pwd)
#change to home (does not show in terminal)
cd "$HOME"
in_xfce=0
in_i3gaps=0
#in_xfce=0
#in_i3gaps=0
cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16)
options=(1 "[DE] xfce4" off # any option can be set to default to "on"
@ -22,74 +22,62 @@ for choice in $choices
do
case $choice in
1)
in_xfce=1
#in_xfce=1
echo "xfce4" >> "$setupdir/selectedpkgs.txt"
;;
2)
in_i3gaps=1
#in_i3gaps=1
echo "i3-gaps" >> "$setupdir/selectedpkgs.txt"
;;
esac
done
in_firefox=0
in_chromium=0
in_netsurf=0
in_icecat=0
in_tor=0
#in_firefox=0
#in_chromium=0
#in_tor=0
cmd=(dialog --separate-output --checklist "Select browsers:" 22 76 16)
options=(1 "Firefox" on # any option can be set to default to "on"
2 "Chromium" off
3 "Netsurf" off
4 "Icecat" off
5 "Torbrowser" on)
3 "Torbrowser" on)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
in_firefox=1
#in_firefox=1
echo "firefox" >> "$setupdir/selectedpkgs.txt"
;;
2)
in_chromium=1
#in_chromium=1
echo "chromium" >> "$setupdir/selectedpkgs.txt"
;;
3)
in_netsurf=1
echo "netsurf" >> "$setupdir/selectedpkgs.txt"
;;
4)
in_icecat=1
echo "icecat-bin" >> "$setupdir/aurselectedpkgs.txt"
;;
5)
in_tor=1
#in_tor=1
echo "torbrowser-launcher" >> "$setupdir/selectedpkgs.txt"
;;
esac
done
in_virtmanager=0
in_steam=0
in_lutris=0
in_blender=0
in_krita=0
in_youtubedl=0
in_discord=0
in_handbrake=0
in_gimp=0
in_audacity=0
in_mangohud=0
in_easystrokes=0
in_liferea=0
in_fractal=0
in_bettergram=0
in_waifu2x=0
in_telegram=0
in_element=0
#in_virtmanager=0
#in_steam=0
#in_lutris=0
#in_blender=0
#in_krita=0
#in_youtubedl=0
#in_discord=0
#in_handbrake=0
#in_gimp=0
#in_audacity=0
#in_mangohud=0
#in_easystrokes=0
#in_liferea=0
#in_fractal=0
#in_bettergram=0
#in_waifu2x=0
#in_telegram=0
#in_element=0
cmd=(dialog --separate-output --checklist "Select other programs:" 22 76 16)
options=(1 "VirtManager" off # any option can be set to default to "on"
@ -116,44 +104,44 @@ for choice in $choices
do
case $choice in
1)
in_virtmanager=1
#in_virtmanager=1
printf '%s\n' 'qemu' 'virt-manager' >> "$setupdir/selectedpkgs.txt"
;;
2)
in_steam=1
#in_steam=1
printf '%s\n' 'steam' 'steam-native-runtime' >> "$setupdir/selectedpkgs.txt"
;;
3)
in_lutris=1
#in_lutris=1
echo "lutris" >> "$setupdir/selectedpkgs.txt"
;;
4)
in_blender=1
#in_blender=1
echo "blender" >> "$setupdir/selectedpkgs.txt"
;;
5)
in_krita=1
#in_krita=1
echo "krita" >> "$setupdir/selectedpkgs.txt"
;;
6)
in_youtubedl=1
#in_youtubedl=1
echo "youtube-dl" >> "$setupdir/selectedpkgs.txt"
;;
7)
in_discord=1
#in_discord=1
#echo "discord" >> "$setupdir/selectedpkgs.txt"
echo "discord_arch_electron" >> "$setupdir/aurselectedpkgs.txt"
;;
8)
in_handbrake=1
#in_handbrake=1
echo "handbrake" >> "$setupdir/selectedpkgs.txt"
;;
9)
in_gimp=1
#in_gimp=1
echo "gimp" >> "$setupdir/selectedpkgs.txt"
;;
10)
in_audacity=1
#in_audacity=1
echo "audacity" >> "$setupdir/selectedpkgs.txt"
;;
11)
@ -161,31 +149,31 @@ do
in_mangohud=1
;;
12)
in_easystrokes=1
#in_easystrokes=1
echo "easystroke" >> "$setupdir/aurselectedpkgs.txt"
;;
13)
in_liferea=1
#in_liferea=1
echo "liferea" >> "$setupdir/aurselectedpkgs.txt"
;;
14)
in_fractal=1
#in_fractal=1
echo "fractal" >> "$setupdir/selectedpkgs.txt"
;;
15)
in_bettergram=1
#in_bettergram=1
echo "bettergram" >> "$setupdir/aurselectedpkgs.txt"
;;
16)
in_waifu2x=1
#in_waifu2x=1
echo "waifu2x-ncnn-vulkan" >> "$setupdir/aurselectedpkgs.txt"
;;
17)
in_telegram=1
#in_telegram=1
echo "telegram-desktop" >> "$setupdir/selectedpkgs.txt"
;;
18)
in_element=1
#in_element=1
echo "element-desktop" >> "$setupdir/selectedpkgs.txt"
;;
esac
@ -209,7 +197,7 @@ do
done
in_doomemacs=0
in_vscodium=0
#in_vscodium=0
cmd=(dialog --separate-output --checklist "Code editors" 22 76 16)
options=(1 "doom-emacs" off
@ -226,14 +214,14 @@ do
# TODO handle rest of installation
;;
2)
in_vscodium=1
#in_vscodium=1
echo "vscodium-bin" >> "$setupdir/aurselectedpkgs.txt"
;;
esac
done
in_teams=0
in_slack=0
#in_teams=0
#in_slack=0
cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16)
options=(1 "teams" off
@ -244,18 +232,18 @@ for choice in $choices
do
case $choice in
1)
in_teams=1
#in_teams=1
echo "teams" >> "$setupdir/aurselectedpkgs.txt"
;;
2)
in_slack=1
#in_slack=1
#echo "slack-desktop" >> "$setupdir/aurselectedpkgs.txt"
echo "slack-electron" >> "$setupdir/aurselectedpkgs.txt"
;;
esac
done
in_pkgstats=0
#in_pkgstats=0
cmd=(dialog --separate-output --checklist "Report installed packages?" 22 76 16)
options=(1 "pkgstats" off)
@ -265,7 +253,7 @@ for choice in $choices
do
case $choice in
1)
in_pkgstats=1
#in_pkgstats=1
echo "pkgstats" >> "$setupdir/selectedpkgs.txt"
;;
esac
@ -367,20 +355,25 @@ echo Installed wine
echo Installing selected programs
#DEs & WMs
: '
if [ $in_xfce -eq 1 ]; then
echo "Installing xfce"
sudo pacman -S --needed xfce4
else
echo "Skipping xfce"
fi
'
: '
if [ $in_i3gaps -eq 1 ]; then
echo "Installing i3-gaps"
sudo pacman -S --needed i3-gaps
else
echo "Skipping i3-gaps"
fi
'
: '
#browsers
if [ $in_firefox -eq 1 ]; then
echo "Installing Firefox"
@ -388,78 +381,100 @@ if [ $in_firefox -eq 1 ]; then
else
echo "Skipping Firefox"
fi
'
: '
if [ $in_chromium -eq 1 ]; then
echo "Installing Chromium"
sudo pacman -S --needed chromium
else
echo "Skipping Chromium"
fi
'
: '
if [ $in_netsurf -eq 1 ]; then
echo "Installing Netsurf"
sudo pacman -S --needed netsurf
else
echo "Skipping Netsurf"
fi
'
: '
if [ $in_icecat -eq 1 ]; then
echo "Installing Icecat"
paru -S --needed icecat-bin
else
echo "Skipping Icecat"
fi
'
: '
if [ $in_tor -eq 1 ]; then
echo "Installing Tor"
sudo pacman -S --needed torbrowser-launcher
else
echo "Skipping Tor"
fi
'
#other programs
: '
if [ $in_virtmanager -eq 1 ]; then
echo "Installing VirtManager"
sudo pacman -S --needed qemu virt-manager
else
echo "Skipping VirtManager"
fi
'
: '
if [ $in_steam -eq 1 ]; then
echo "Installing Steam"
sudo pacman -S --needed steam steam-native-runtime
else
echo "Skipping Steam"
fi
'
: '
if [ $in_lutris -eq 1 ]; then
echo "Installing Lutris"
sudo pacman -S --needed lutris
else
echo "Skipping Lutris"
fi
'
: '
if [ $in_blender -eq 1 ]; then
echo "Installing Blender"
sudo pacman -S --needed blender
else
echo "Skipping Blender"
fi
'
: '
if [ $in_krita -eq 1 ]; then
echo "Installing Krita"
sudo pacman -S --needed krita
else
echo "Skipping Krita"
fi
'
: '
if [ $in_youtubedl -eq 1 ]; then
echo "Installing Youtube-dl"
sudo pacman -S --needed youtube-dl
else
echo "Skipping Youtube-dl"
fi
'
: '
if [ $in_discord -eq 1 ]; then
echo "Installing Discord"
#sudo pacman -S --needed discord
@ -467,27 +482,34 @@ if [ $in_discord -eq 1 ]; then
else
echo "Skipping Discord"
fi
'
: '
if [ $in_handbrake -eq 1 ]; then
echo "Installing Handbrake"
sudo pacman -S --needed handbrake
else
echo "Skipping Handbrake"
fi
'
: '
if [ $in_gimp -eq 1 ]; then
echo "Installing Gimp"
sudo pacman -S --needed gimp
else
echo "Skipping Gimp"
fi
'
: '
if [ $in_audacity -eq 1 ]; then
echo "Installing Audacity"
sudo pacman -S --needed audacity
else
echo "Skipping Audacity"
fi
'
if [ $in_mangohud -eq 1 ]; then
echo "Installing MangoHud"
@ -497,54 +519,68 @@ else
echo "Skipping MangoHud"
fi
: '
if [ $in_easystrokes -eq 1 ]; then
echo "Installing Easystrokes"
paru -S --needed easystroke
else
echo "Skipping Easystrokes"
fi
'
: '
if [ $in_liferea -eq 1 ]; then
echo "Installing Liferea"
paru -S --needed liferea
else
echo "Skipping Liferea"
fi
'
: '
if [ $in_fractal -eq 1 ]; then
echo "Installing Fractal"
sudo pacman -S --needed fractal
else
echo "Skipping Fractal"
fi
'
: '
if [ $in_bettergram -eq 1 ]; then
echo "Installing Bettergram"
paru -S --needed bettergram
else
echo "Skipping Bettergram"
fi
'
: '
if [ $in_waifu2x -eq 1 ]; then
echo "Installing Waifu2x"
paru -S --needed waifu2x-ncnn-vulkan
else
echo "Skipping Waifu2x"
fi
'
: '
if [ $in_telegram -eq 1 ]; then
echo "Installing Telegram"
sudo pacman -S --needed telegram-desktop
else
echo "Skipping Telegram"
fi
'
: '
if [ $in_element -eq 1 ]; then
echo "Installing Element"
sudo pacman -S --needed element-desktop
else
echo "Skipping Element"
fi
'
#performance and battery life
if [ $in_acpufreq -eq 1 ]; then
@ -568,13 +604,16 @@ else
echo "Skipping doom-emacs"
fi
: '
if [ $in_vscodium -eq 1 ]; then
echo "Installing vscodium"
paru -S --needed vscodium-bin
else
echo "Skipping vscodium"
fi
'
: '
#other social stuff
if [ $in_teams -eq 1 ]; then
echo "Installing teams"
@ -582,7 +621,9 @@ if [ $in_teams -eq 1 ]; then
else
echo "Skipping teams"
fi
'
: '
if [ $in_slack -eq 1 ]; then
echo "Installing slack"
#paru -S --needed slack-desktop
@ -590,7 +631,9 @@ if [ $in_slack -eq 1 ]; then
else
echo "Skipping slack"
fi
'
: '
#stats
if [ $in_pkgstats -eq 1 ]; then
echo "Installing pkgstats"
@ -598,6 +641,7 @@ if [ $in_pkgstats -eq 1 ]; then
else
echo "Skipping pkgstats"
fi
'
# other system configs
# arco pc
@ -612,6 +656,12 @@ if [ $in_arco_hp -eq 1 ]; then
paru -S --needed - < "$setupdir/packages/arch-hp-packages.txt"
fi
# install selected packages
sudo pacman -S --needed - < "$setupdir/selectedpkgs.txt"
# install selected aur packages
paru -S --needed - < "$setupdir/aurselectedpkgs.txt"
#change shell
chsh -s /usr/bin/fish "$USER"