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