58 lines
4.0 KiB
Bash
Executable File
58 lines
4.0 KiB
Bash
Executable File
#!/bin/bash
|
|
#github-action genshdoc
|
|
#
|
|
# @file ArchTitus
|
|
# @brief Entrance script that launches children scripts for each phase of installation.
|
|
# @testing if script was run as root for full os run
|
|
if [ "$EUID" -ne 0 ]
|
|
then echo "Please run as root"
|
|
exit
|
|
fi
|
|
# @docker check
|
|
if grep -sq 'docker\|lxc' /proc/1/cgroup
|
|
then
|
|
echo "running in docker container, no supported (at the moment)"
|
|
fi
|
|
# Find the name of the folder the scripts are in
|
|
set -a
|
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts
|
|
CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs
|
|
set +a
|
|
echo -ne "
|
|
-------------------------------------------------------------------------
|
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
|
███████║██████╔╝██║ ███████║ ██║ ██║ ██║ ██║ ██║███████╗
|
|
██╔══██║██╔══██╗██║ ██╔══██║ ██║ ██║ ██║ ██║ ██║╚════██║
|
|
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
|
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
-------------------------------------------------------------------------
|
|
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
|
|
( arch-chroot /mnt $HOME/ArchTitus/scripts/1-setup.sh )|& tee 1-setup.log
|
|
if [[ ! $DESKTOP_ENV == server ]]; then
|
|
( arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/scripts/2-user.sh )|& tee 2-user.log
|
|
fi
|
|
( arch-chroot /mnt $HOME/ArchTitus/scripts/3-post-setup.sh )|& tee 3-post-setup.log
|
|
cp -v *.log /mnt/home/$USERNAME
|
|
|
|
echo -ne "
|
|
-------------------------------------------------------------------------
|
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
|
███████║██████╔╝██║ ███████║ ██║ ██║ ██║ ██║ ██║███████╗
|
|
██╔══██║██╔══██╗██║ ██╔══██║ ██║ ██║ ██║ ██║ ██║╚════██║
|
|
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
|
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
-------------------------------------------------------------------------
|
|
Automated Arch Linux Installer
|
|
-------------------------------------------------------------------------
|
|
Done - Please Eject Install Media and Reboot
|
|
"
|