changes to archtitus.sh

This commit is contained in:
farhan 2022-02-28 15:19:18 +00:00
parent 8fb6610ee9
commit 1738fa0068
1 changed files with 29 additions and 20 deletions

View File

@ -6,6 +6,16 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts
CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs
set +a set +a
source_file() {
if [[ -f "$1" ]]; then
source "$1"
else
echo "ERROR! Missing file: $1"
exit 0
fi
}
logo() {
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -17,28 +27,27 @@ echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
Automated Arch Linux Installer Automated Arch Linux Installer
------------------------------------------------------------------------- -------------------------------------------------------------------------
Scripts are in directory named ArchTitus
" "
( bash $SCRIPT_DIR/scripts/startup.sh )|& tee startup.log }
source $CONFIGS_DIR/setup.conf
( bash $SCRIPT_DIR/scripts/0-preinstall.sh )|& tee 0-preinstall.log sequence() {
. $SCRIPT_DIR/scripts/startup.sh # Dont need to log user password in plain text
source_file $CONFIGS_DIR/setup.conf
. $SCRIPT_DIR/scripts/0-preinstall.sh |& tee 0-preinstall.log
(arch-chroot /mnt $HOME/ArchTitus/scripts/1-setup.sh) |& tee 1-setup.log (arch-chroot /mnt $HOME/ArchTitus/scripts/1-setup.sh) |& tee 1-setup.log
if [[ ! $DESKTOP_ENV == server ]]; then if [[ ! $DESKTOP_ENV == server ]]; then
(arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/scripts/2-user.sh) |& tee 2-user.log (arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/scripts/2-user.sh) |& tee 2-user.log
fi fi
(arch-chroot /mnt $HOME/ArchTitus/scripts/3-post-setup.sh)|& tee 3-post-setup.log (arch-chroot /mnt $HOME/ArchTitus/scripts/3-post-setup.sh)|& tee 3-post-setup.log
cp -v *.log /mnt/home/$USERNAME cp -v *.log /mnt/home/$USERNAME
}
clear
logo
echo -ne "
Scripts are in directory named ArchTitus
"
sequence
logo
echo -ne " echo -ne "
-------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
███████║██████╔╝██║ ███████║ ██║ ██║ ██║ ██║ ██║███████╗
██╔══██║██╔══██╗██║ ██╔══██║ ██║ ██║ ██║ ██║ ██║╚════██║
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
-------------------------------------------------------------------------
Automated Arch Linux Installer
-------------------------------------------------------------------------
Done - Please Eject Install Media and Reboot Done - Please Eject Install Media and Reboot
" "