Added option to choose between minimal/full installation

This commit is contained in:
stojshic 2022-01-25 15:53:51 +01:00
parent 63ce0fc796
commit d13f9f7877
17 changed files with 111 additions and 47 deletions

View File

@ -71,10 +71,16 @@ echo -ne "
Installing Base System
-------------------------------------------------------------------------
"
cat /root/ArchTitus/pkg-files/pacman-pkgs.txt | while read line
# sed $INSTALL_TYPE is using install typeto check for MINIMAL installation, if it's true, stop
# stop the script and move on, not installing any more packages below that line
sed -n '/'$INSTALL_TYPE'/q;p' /root/ArchTitus/pkg-files/pacman-pkgs.txt | while read line
do
echo "INSTALLING: ${line}"
sudo pacman -S --noconfirm --needed ${line}
if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]; then
# If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line
continue
fi
echo "INSTALLING: ${line}"
sudo pacman -S --noconfirm --needed ${line}
done
echo -ne "
-------------------------------------------------------------------------

View File

@ -28,15 +28,27 @@ if [[ ! $AUR_HELPER == none ]]; then
git clone "https://aur.archlinux.org/$AUR_HELPER.git"
cd ~/$AUR_HELPER
makepkg -si --noconfirm
$AUR_HELPER -S --noconfirm --needed - < ~/ArchTitus/pkg-files/aur-pkgs.txt
# sed $INSTALL_TYPE is using install typeto check for MINIMAL installation, if it's true, stop
# stop the script and move on, not installing any more packages below that line
sed -n '/'$INSTALL_TYPE'/q;p' ~/ArchTitus/pkg-files/aur-pkgs.txt | while read line
do
if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]; then
# If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line
continue
fi
echo "INSTALLING: ${line}"
$AUR_HELPER -S --noconfirm --needed ${line}
done
fi
export PATH=$PATH:~/.local/bin
cp -r ~/ArchTitus/dotfiles/* ~/.config/
pip install konsave
konsave -i ~/ArchTitus/kde.knsv
sleep 1
konsave -a kde
if [[ $DESKTOP_ENV == "kde" ]] && [[ $INSTALL_TYPE == "FULL" ]]; then
cp -r ~/ArchTitus/dotfiles/* ~/.config/
pip install konsave
konsave -i ~/ArchTitus/kde.knsv
sleep 1
konsave -a kde
fi
echo -ne "
-------------------------------------------------------------------------

View File

@ -19,16 +19,23 @@ echo -ne "
source /root/ArchTitus/setup.conf
cat /root/ArchTitus/pkg-files/${DESKTOP_ENV}.txt | while read line
sed -n '/'$INSTALL_TYPE'/q;p' /root/ArchTitus/pkg-files/${DESKTOP_ENV}.txt | while read line
do
if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]
then
# If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line
continue
fi
echo "INSTALLING: ${line}"
sudo pacman -S --noconfirm --needed ${line}
done
if [[ ${DESKTOP_ENV} == "kde" ]]; then
echo [Theme] >> /etc/sddm.conf
echo Current=Nordic >> /etc/sddm.conf
systemctl enable sddm.service
if [[ ${INSTALL_TYPE} == "FULL" ]]; then
echo [Theme] >> /etc/sddm.conf
echo Current=Nordic >> /etc/sddm.conf
fi
elif [[ "${DESKTOP_ENV}" == "gnome" ]]; then
systemctl enable gdm.service
@ -36,6 +43,14 @@ elif [[ "${DESKTOP_ENV}" == "gnome" ]]; then
elif [[ "${DESKTOP_ENV}" == "lxde" ]]; then
systemctl enable lxdm.service
elif [[ "${DESKTOP_ENV}" == "openbox" ]]; then
sudo pacman -S --noconfirm --needed lightdm lightdm-gtk-greeter
systemctl enable lightdm.service
if [[ "${INSTALL_TYPE}" == "FULL" ]]; then
git clone https://github.com/stojshic/dotfiles-openbox
./dotfiles-openbox/install.sh
fi
else
sudo pacman -S --noconfirm --needed lightdm lightdm-gtk-greeter
systemctl enable lightdm.service

View File

@ -19,7 +19,9 @@ echo -ne "
source $SCRIPT_DIR/setup.conf
( bash 0-preinstall.sh )|& tee 0-preinstall.log
( arch-chroot /mnt /root/ArchTitus/1-setup.sh )|& tee 1-setup.log
( arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/2-user.sh )|& tee 2-user.log
if [[ ! $DESKTOP_ENV == server ]]; then
( arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/2-user.sh )|& tee 2-user.log
fi
( arch-chroot /mnt /root/ArchTitus/3-post-setup.sh )|& tee 3-post-setup.log
( arch-chroot /mnt /root/ArchTitus/4-desktop.sh )|& tee 4-desktop.log

View File

@ -1,5 +1,5 @@
--END OF MINIMAL INSTALL--
autojump
awesome-terminal-fonts
brave-bin
dxvk-bin
github-desktop-bin
@ -12,15 +12,8 @@ nordic-darker-standard-buttons-theme
nordic-darker-theme
nordic-kde-git
nordic-theme
noto-fonts-emoji
papirus-icon-theme
plasma-pa
ocs-url
sddm-nordic-theme-git
snapper-gui-git
ttf-droid
ttf-hack
ttf-meslo
ttf-roboto
zoom
snap-pac

View File

@ -1,2 +1,3 @@
budgie-desktop
gnome
--END OF MINIMAL INSTALL--

View File

@ -1,3 +1,4 @@
cinnamon
metacity
gnome-shell
--END OF MINIMAL INSTALL--

View File

@ -1,2 +1,3 @@
deepin
deepin-extra
--END OF MINIMAL INSTALL--

View File

@ -1,4 +1,3 @@
gnome
gnome-tweaks
dconf-editor
--END OF MINIMAL INSTALL--
gnome-extras

View File

@ -1,10 +1,13 @@
plasma-desktop
sddm
dolphin
--END OF MINIMAL INSTALL--
ark
audiocd-kio
bluedevil
breeze
breeze-gtk
discover
dolphin
extra-cmake-modules
filelight
gwenview
@ -21,11 +24,10 @@ layer-shell-qt
milou
okular
oxygen
plasma-desktop
plasma-nm
plasma-pa
powerdevil
print-manager
sddm-kcm
spectacle
systemsettings
xdg-desktop-portal-kde

View File

@ -1 +1,2 @@
lxde
--END OF MINIMAL INSTALL--

View File

@ -1,2 +1,3 @@
mate
mate-extra
--END OF MINIMAL INSTALL--

View File

@ -1,6 +1,10 @@
openbox
lightdm
lightdm-gtk-greeter
thunar
lxsession
rxvt-unicode
--END OF MINIMAL INSTALL--
alsa-utils
pulseaudio
pulseaudio-alsa
@ -12,12 +16,10 @@ rofi
feh
lxappearance
qt5ct
lxsession
gsimplecal
xautolock
xclip
scrot
thunar
thunar-archive-plugin
thunar-volman
thunar-media-tags-plugin
@ -27,7 +29,6 @@ w3m
geany
nano
viewnior
viewnior
pavucontrol
parcellite
neofetch
@ -38,3 +39,5 @@ xfce4-power-manager
imagemagick
playerctl
xsettingsd
obconf

View File

@ -6,14 +6,28 @@ xorg-drivers
xorg-xkill
xorg-xinit
xterm
base
binutils
dosfstools
grub
iptables-nft
linux
linux-firmware
linux-headers
networkmanager
noto-fonts-emoji
sudo
usbutils
vim
xdg-user-dirs
--END OF MINIMAL INSTALL--
alsa-plugins
alsa-utils
autoconf
automake
base
awesome-terminal-fonts
bash-completion
bind
binutils
bison
bluez
bluez-libs
@ -26,7 +40,6 @@ code
cronie
cups
dialog
dosfstools
dtc
efibootmgr
egl-wayland
@ -41,22 +54,17 @@ gimp
git
gparted
gptfdisk
grub
grub-customizer
gst-libav
gst-plugins-good
gst-plugins-ugly
haveged
htop
iptables-nft
jdk-openjdk
kitty
libdvdcss
libnewt
libtool
linux
linux-firmware
linux-headers
lsof
lutris
lzop
@ -64,7 +72,6 @@ m4
make
nano
neofetch
networkmanager
ntfs-3g
ntp
openbsd-netcat
@ -72,6 +79,7 @@ openssh
os-prober
p7zip
pacman-contrib
papirus-icon-theme
patch
picom
pkgconf
@ -85,19 +93,19 @@ python-pyqt5
python-pip
qemu
rsync
sddm
snap-pack
snapper
steam
sudo
swtpm
synergy
terminus-font
traceroute
ttf-droid
ttf-hack
ttf-roboto
ufw
unrar
unzip
usbutils
vim
virt-manager
virt-viewer
wget
@ -105,7 +113,6 @@ which
wine-gecko
wine-mono
winetricks
xdg-user-dirs
zip
zsh
zsh-syntax-highlighting

1
pkg-files/server.txt Normal file
View File

@ -0,0 +1 @@
--END OF MINIMAL INSTALL--

View File

@ -1,2 +1,3 @@
xfce4
xfce-goodies
--END OF MINIMAL INSTALL--

View File

@ -282,12 +282,22 @@ aurhelper () {
desktopenv () {
# Let the user choose Desktop Enviroment from predefined list
echo -ne "Please select your desired Desktop Enviroment:\n"
options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox)
options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox server)
select_option $? 4 "${options[@]}"
desktop_env=${options[$?]}
set_option DESKTOP_ENV $desktop_env
}
installtype () {
echo -ne "Please select type of installation:\n\n
Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n
Minimal Install: Installs only apps few selected apps to get you started\n"
options=(FULL MINIMAL)
select_option $? 4 "${options[@]}"
install_type=${options[$?]}
set_option INSTALL_TYPE $install_type
}
# More features in future
# language (){}
@ -298,9 +308,17 @@ userinfo
clear
logo
desktopenv
clear
logo
aurhelper
# Set fixed options that installation uses if user choses server installation
set_option INSTALL_TYPE MINIMAL
set_option AUR_HELPER NONE
if [[ ! $desktop_env == server ]]; then
clear
logo
aurhelper
clear
logo
installtype
fi
clear
logo
diskpart