added aurhelpers and other changes
This commit is contained in:
parent
7b81ea34c9
commit
ee99fa306f
|
|
@ -7,7 +7,7 @@ CONFIG_FILE="$SCRIPT_DIR"/setup.conf
|
||||||
if [[ -f "$CONFIG_FILE" ]]; then
|
if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -36,14 +36,19 @@ do_btrfs() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# list of packages to install
|
||||||
|
PACKAGES=()
|
||||||
|
|
||||||
do_format() {
|
do_format() {
|
||||||
case "$FS" in
|
case "$FS" in
|
||||||
"xfs")
|
"xfs")
|
||||||
install_pkg xfsprogs
|
install_pkg xfsprogs
|
||||||
|
PACKAGES+=("xfsprogs")
|
||||||
mkfs.xfs -f -L "$ROOT" "$1"
|
mkfs.xfs -f -L "$ROOT" "$1"
|
||||||
;;
|
;;
|
||||||
"btrfs")
|
"btrfs")
|
||||||
install_pkg btrfs-progs
|
install_pkg btrfs-progs
|
||||||
|
PACKAGES+=("btrfs-progs")
|
||||||
mkfs.btrfs -L "$ROOT" "$1" -f
|
mkfs.btrfs -L "$ROOT" "$1" -f
|
||||||
;;
|
;;
|
||||||
"ext4")
|
"ext4")
|
||||||
|
|
@ -54,6 +59,7 @@ do_format() {
|
||||||
;;
|
;;
|
||||||
"f2fs")
|
"f2fs")
|
||||||
install_pkg f2fs-tools
|
install_pkg f2fs-tools
|
||||||
|
PACKAGES+=("f2fs-tools")
|
||||||
mkfs.f2fs -l "$ROOT" -O extra_attr,inode_checksum,sb_checksum "$1"
|
mkfs.f2fs -l "$ROOT" -O extra_attr,inode_checksum,sb_checksum "$1"
|
||||||
;;
|
;;
|
||||||
"ext2")
|
"ext2")
|
||||||
|
|
@ -64,14 +70,17 @@ do_format() {
|
||||||
;;
|
;;
|
||||||
"jfs")
|
"jfs")
|
||||||
install_pkg jfsutils
|
install_pkg jfsutils
|
||||||
|
PACKAGES+=("jfsutils")
|
||||||
mkfs.jfs -L "$ROOT" "$1"
|
mkfs.jfs -L "$ROOT" "$1"
|
||||||
;;
|
;;
|
||||||
"nilfs2")
|
"nilfs2")
|
||||||
install_pkg nilfs-utils
|
install_pkg nilfs-utils
|
||||||
|
PACKAGES+=("nilfs-utils")
|
||||||
mkfs.nilfs2 -L "$ROOT" "$1"
|
mkfs.nilfs2 -L "$ROOT" "$1"
|
||||||
;;
|
;;
|
||||||
"ntfs")
|
"ntfs")
|
||||||
install_pkg ntfs-3g
|
install_pkg ntfs-3g
|
||||||
|
PACKAGES+=("ntfs-3g")
|
||||||
mkfs.ntfs -Q -L "$ROOT" "$1"
|
mkfs.ntfs -Q -L "$ROOT" "$1"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -82,7 +91,6 @@ do_format() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_lvm() {
|
do_lvm() {
|
||||||
install_pkg lvm2
|
|
||||||
i=0
|
i=0
|
||||||
while [[ "$i" -le "${#LVM_PART_NUM[@]}" ]]; do
|
while [[ "$i" -le "${#LVM_PART_NUM[@]}" ]]; do
|
||||||
if [[ "${#LVM_PART_NUM[@]}" -eq 1 ]]; then
|
if [[ "${#LVM_PART_NUM[@]}" -eq 1 ]]; then
|
||||||
|
|
@ -109,11 +117,13 @@ mount_lvm() {
|
||||||
mount -t "$FS" /dev/"$LVM_VG"/"$x" "$MOUNTPOINT"/"$x"
|
mount -t "$FS" /dev/"$LVM_VG"/"$x" "$MOUNTPOINT"/"$x"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
prep_disk() {
|
prep_disk() {
|
||||||
wipefs -a -f "$DISK" # wipe any file system
|
wipefs -a -f "$DISK" # wipe any file system
|
||||||
sgdisk -Z "$DISK" # zap all on disk
|
sgdisk -Z "$DISK" # zap all on disk
|
||||||
sgdisk -a 2048 -o "$DISK" # new gpt disk 2048 alignment
|
sgdisk -a 2048 -o "$DISK" # new gpt disk 2048 alignment
|
||||||
}
|
}
|
||||||
|
|
||||||
do_partition() {
|
do_partition() {
|
||||||
prep_disk
|
prep_disk
|
||||||
if [[ "$UEFI" -eq 1 ]]; then
|
if [[ "$UEFI" -eq 1 ]]; then
|
||||||
|
|
@ -166,6 +176,7 @@ if [[ "$LAYOUT" -eq 1 ]]; then
|
||||||
mount_boot
|
mount_boot
|
||||||
|
|
||||||
elif [[ "$LVM" -eq 1 ]]; then
|
elif [[ "$LVM" -eq 1 ]]; then
|
||||||
|
PACKAGES+=("lvm2")
|
||||||
do_partition
|
do_partition
|
||||||
sgdisk --typecode=2:8e00 "$DISK"
|
sgdisk --typecode=2:8e00 "$DISK"
|
||||||
partprobe "$DISK"
|
partprobe "$DISK"
|
||||||
|
|
@ -178,6 +189,7 @@ elif [[ "$LVM" -eq 1 ]]; then
|
||||||
set_option "HOOKS" "(lvm2 filesystems)"
|
set_option "HOOKS" "(lvm2 filesystems)"
|
||||||
|
|
||||||
elif [[ "$LUKS" -eq 1 ]]; then
|
elif [[ "$LUKS" -eq 1 ]]; then
|
||||||
|
PACKAGES+=("cryptsetup" "lvm2")
|
||||||
do_partition
|
do_partition
|
||||||
make_boot
|
make_boot
|
||||||
echo -n "$LUKS_PASSWORD" | cryptsetup -y -v luksFormat "$PART2" -
|
echo -n "$LUKS_PASSWORD" | cryptsetup -y -v luksFormat "$PART2" -
|
||||||
|
|
@ -218,13 +230,13 @@ fi
|
||||||
|
|
||||||
echo "Arch Install on Main Drive"
|
echo "Arch Install on Main Drive"
|
||||||
# for test purposes
|
# for test purposes
|
||||||
pacstrap "$MOUNTPOINT" base linux vim --needed --noconfirm
|
# pacstrap "$MOUNTPOINT" base linux vim --needed --noconfirm
|
||||||
#pacstrap "$MOUNTPOINT" base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed
|
pacstrap "$MOUNTPOINT" base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt "${PACKAGES[@]}" --noconfirm --needed
|
||||||
echo "keyserver hkp://keyserver.ubuntu.com" >>"$MOUNTPOINT"/etc/pacman.d/gnupg/gpg.conf
|
echo "keyserver hkp://keyserver.ubuntu.com" >>"$MOUNTPOINT"/etc/pacman.d/gnupg/gpg.conf
|
||||||
|
|
||||||
genfstab -U "$MOUNTPOINT" >>"$MOUNTPOINT"/etc/fstab
|
genfstab -U "$MOUNTPOINT" >>"$MOUNTPOINT"/etc/fstab
|
||||||
|
|
||||||
cp -R "${SCRIPT_DIR}" "$MOUNTPOINT"/root/ArchTitus
|
cp -R "$SCRIPT_DIR" "$MOUNTPOINT"/root/ArchTitus
|
||||||
cp /etc/pacman.d/mirrorlist "$MOUNTPOINT"/etc/pacman.d/mirrorlist
|
cp /etc/pacman.d/mirrorlist "$MOUNTPOINT"/etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
|
# TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
|
||||||
|
|
|
||||||
12
1-setup.sh
12
1-setup.sh
|
|
@ -7,18 +7,15 @@ CONFIG_FILE="$SCRIPT_DIR"/setup.conf
|
||||||
if [[ -f "$CONFIG_FILE" ]]; then
|
if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
title basic installations
|
title basic installations
|
||||||
install_pkg networkmanager dhclient reflector \
|
install_pkg networkmanager dhclient reflector \
|
||||||
rsync btrfs-progs arch-install-scripts \
|
rsync arch-install-scripts \
|
||||||
git pacman-contrib curl
|
git pacman-contrib curl
|
||||||
|
|
||||||
echo "Network Setup"
|
|
||||||
systemctl enable --now NetworkManager
|
|
||||||
|
|
||||||
install_xorg() {
|
install_xorg() {
|
||||||
install_pkg "xorg xorg-server"
|
install_pkg "xorg xorg-server"
|
||||||
}
|
}
|
||||||
|
|
@ -48,10 +45,6 @@ localectl --no-ask-password set-locale LANG="$LOCALE" LC_TIME="$LOCALE"
|
||||||
localectl --no-ask-password set-keymap --no-convert "$KEYMAP"
|
localectl --no-ask-password set-keymap --no-convert "$KEYMAP"
|
||||||
|
|
||||||
# Add sudo no password rights
|
# Add sudo no password rights
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
|
|
||||||
>>>>>>> 44fb72cfdf009a9815f39848bc8aa7d8f7c8321b
|
|
||||||
sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
|
sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
|
||||||
|
|
||||||
#Add parallel downloading
|
#Add parallel downloading
|
||||||
|
|
@ -70,6 +63,7 @@ case "$DESKTOP" in
|
||||||
echo "INSTALLING: $LINE"
|
echo "INSTALLING: $LINE"
|
||||||
install_pkg "$LINE"
|
install_pkg "$LINE"
|
||||||
done </root/ArchTitus/pkg-files/pacman-pkgs.txt
|
done </root/ArchTitus/pkg-files/pacman-pkgs.txt
|
||||||
|
systemctl enable sddm.service
|
||||||
;;
|
;;
|
||||||
"gnome")
|
"gnome")
|
||||||
install_xorg
|
install_xorg
|
||||||
|
|
|
||||||
43
2-user.sh
43
2-user.sh
|
|
@ -11,22 +11,49 @@ CONFIG_FILE="$SCRIPT_DIR"/setup.conf
|
||||||
if [[ -f "$CONFIG_FILE" ]]; then
|
if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ~ || exit 1
|
cd ~ || exit 1
|
||||||
git clone "https://aur.archlinux.org/yay.git"
|
case "$AURHELPER" in
|
||||||
cd ~/yay || exit 1
|
"yay")
|
||||||
|
install_pkg "git go"
|
||||||
|
git clone "https://aur.archlinux.org/yay.git"
|
||||||
|
;;
|
||||||
|
"trizen")
|
||||||
|
install_pkg "git perl"
|
||||||
|
git clone "https://aur.archlinux.org/trizen.git"
|
||||||
|
;;
|
||||||
|
"aurman")
|
||||||
|
install_pkg "git"
|
||||||
|
git clone "https://aur.archlinux.org/aurman.git"
|
||||||
|
;;
|
||||||
|
"aura")
|
||||||
|
install_pkg "git stack"
|
||||||
|
git clone "https://aur.archlinux.org/aura.git"
|
||||||
|
;;
|
||||||
|
"pikaur")
|
||||||
|
install_pkg "git"
|
||||||
|
git clone "https://aur.archlinux.org/pikaur.git"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
something_failed
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
cd "$AURHELPER" || exit 1
|
||||||
makepkg -si --noconfirm
|
makepkg -si --noconfirm
|
||||||
cd ~ || exit 1
|
cd ~ || exit 1
|
||||||
|
|
||||||
touch "$HOME/.cache/zshhistory"
|
|
||||||
git clone "https://github.com/ChrisTitusTech/zsh"
|
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
|
|
||||||
ln -s "$HOME/zsh/.zshrc" ~/.zshrc
|
|
||||||
|
|
||||||
yay -S --noconfirm --needed - <~/ArchTitus/pkg-files/aur-pkgs.txt
|
"$AURHELPER" -S --noconfirm --needed - <~/ArchTitus/pkg-files/aur-pkgs.txt
|
||||||
|
|
||||||
|
if [[ "$LAYOUT" -eq 1 ]]; then
|
||||||
|
touch "$HOME/.cache/zshhistory"
|
||||||
|
git clone "https://github.com/ChrisTitusTech/zsh"
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
|
||||||
|
ln -s "$HOME/zsh/.zshrc" ~/.zshrc
|
||||||
|
fi
|
||||||
|
|
||||||
export PATH=$PATH:~/.local/bin
|
export PATH=$PATH:~/.local/bin
|
||||||
cp -r ~/ArchTitus/dotfiles/* ~/.config/
|
cp -r ~/ArchTitus/dotfiles/* ~/.config/
|
||||||
|
|
|
||||||
|
|
@ -7,53 +7,39 @@ CONFIG_FILE="$SCRIPT_DIR"/setup.conf
|
||||||
if [[ -f "$CONFIG_FILE" ]]; then
|
if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set kernel parameter for decrypting the drive
|
if [[ "$LAYOUT" -eq 1 || "$BOOTLOADER" =~ "grub" ]]; then
|
||||||
# if [[ "${FS}" == "luks" ]]; then
|
echo -e "Installing CyberRe Grub theme..."
|
||||||
# sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%GRUB_CMDLINE_LINUX_DEFAULT=\"cryptdevice=UUID=$encryped_partition_uuid:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub
|
THEME_DIR="/boot/grub/themes"
|
||||||
# fi
|
THEME_NAME=CyberRe
|
||||||
|
echo -e "Creating the theme directory..."
|
||||||
|
mkdir -p "${THEME_DIR}/${THEME_NAME}"
|
||||||
|
echo -e "Copying the theme..."
|
||||||
|
cd "$HOME"/ArchTitus || exit 1
|
||||||
|
cp -a ${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME}
|
||||||
|
echo -e "Backing up Grub config..."
|
||||||
|
cp -an /etc/default/grub /etc/default/grub.bak
|
||||||
|
echo -e "Setting the theme as the default..."
|
||||||
|
grep "GRUB_THEME=" /etc/default/grub >/dev/null 2>&1 && sed -i '/GRUB_THEME=/d' /etc/default/grub
|
||||||
|
echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >>/etc/default/grub
|
||||||
|
echo -e "Updating grub..."
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
echo -e "All set!"
|
||||||
|
|
||||||
echo -e "Installing CyberRe Grub theme..."
|
fi
|
||||||
THEME_DIR="/boot/grub/themes"
|
|
||||||
THEME_NAME=CyberRe
|
|
||||||
echo -e "Creating the theme directory..."
|
|
||||||
mkdir -p "${THEME_DIR}/${THEME_NAME}"
|
|
||||||
echo -e "Copying the theme..."
|
|
||||||
cd "$HOME"/ArchTitus || exit 1
|
|
||||||
cp -a ${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME}
|
|
||||||
echo -e "Backing up Grub config..."
|
|
||||||
cp -an /etc/default/grub /etc/default/grub.bak
|
|
||||||
echo -e "Setting the theme as the default..."
|
|
||||||
grep "GRUB_THEME=" /etc/default/grub >/dev/null 2>&1 && sed -i '/GRUB_THEME=/d' /etc/default/grub
|
|
||||||
echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >>/etc/default/grub
|
|
||||||
echo -e "Updating grub..."
|
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
echo -e "All set!"
|
|
||||||
|
|
||||||
echo -ne "
|
if [[ "$LAYOUT" -eq 1 || "$DESKTOP" =~ "lxqt" ]]; then
|
||||||
-------------------------------------------------------------------------
|
echo "Setting up SDDM Theme"
|
||||||
Enabling Login Display Manager
|
cat <<EOF >/etc/sddm.conf
|
||||||
-------------------------------------------------------------------------
|
|
||||||
"
|
|
||||||
systemctl enable sddm.service
|
|
||||||
echo -ne "
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
Setting up SDDM Theme
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
"
|
|
||||||
cat <<EOF >/etc/sddm.conf
|
|
||||||
[Theme]
|
[Theme]
|
||||||
Current=Nordic
|
Current=Nordic
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo "Enabling Essential Services"
|
||||||
-------------------------------------------------------------------------
|
|
||||||
Enabling Essential Services
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
"
|
|
||||||
systemctl enable cups.service
|
systemctl enable cups.service
|
||||||
systemctl enable cronie.service
|
systemctl enable cronie.service
|
||||||
ntpd -qg
|
ntpd -qg
|
||||||
|
|
@ -62,21 +48,15 @@ systemctl disable dhcpcd.service
|
||||||
systemctl stop dhcpcd.service
|
systemctl stop dhcpcd.service
|
||||||
systemctl enable NetworkManager.service
|
systemctl enable NetworkManager.service
|
||||||
systemctl enable bluetooth
|
systemctl enable bluetooth
|
||||||
echo -ne "
|
|
||||||
-------------------------------------------------------------------------
|
echo "Cleaning"
|
||||||
Cleaning
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
"
|
|
||||||
# Remove no password sudo rights
|
# Remove no password sudo rights
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
|
|
||||||
>>>>>>> 44fb72cfdf009a9815f39848bc8aa7d8f7c8321b
|
|
||||||
sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
|
sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
|
||||||
|
|
||||||
# Add sudo rights
|
# Add sudo rights
|
||||||
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
|
||||||
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
||||||
|
|
||||||
|
cp "$SCRIPT_DIR"/main.log var/log/archtitus.log
|
||||||
rm -r /root/ArchTitus
|
rm -r /root/ArchTitus
|
||||||
rm -r /home/"$USERNAME"/ArchTitus
|
rm -r /home/"$USERNAME"/ArchTitus
|
||||||
|
|
||||||
|
|
|
||||||
54
archtitus.sh
54
archtitus.sh
|
|
@ -25,7 +25,29 @@ logo() {
|
||||||
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
|
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
||||||
"
|
"
|
||||||
<<<<<<< HEAD
|
}
|
||||||
|
|
||||||
|
do_reboot () {
|
||||||
|
umount -R "$MOUNTPOINT"/boot
|
||||||
|
umount -R "$MOUNTPOINT"
|
||||||
|
reboot
|
||||||
|
}
|
||||||
|
|
||||||
|
end() {
|
||||||
|
logo
|
||||||
|
for (( i = 15; i >= 1; i-- )); do
|
||||||
|
read -r -s -n 1 -t 1 -p "Rebooting in $i seconds... Press Esc key to abort or press R key to reboot now."$'\n' KEY#
|
||||||
|
CODE="$?"
|
||||||
|
if [ "$CODE" != "0" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [[ "$KEY" == $'\e' ]]; then
|
||||||
|
break
|
||||||
|
elif [[ "$KEY" == "r" || "$KEY" == "R" ]]; then
|
||||||
|
do_reboot
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
sequence() {
|
sequence() {
|
||||||
|
|
@ -36,37 +58,12 @@ sequence() {
|
||||||
echo "ERROR! Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
=======
|
source "$SCRIPT_DIR"/setup.conf
|
||||||
#!/bin/bash
|
|
||||||
if awk -F/ '$2 == "docker"' /proc/self/cgroup | read; then
|
|
||||||
echo -ne "docker container found script can't install (at the moment)"
|
|
||||||
else
|
|
||||||
bash startup.sh
|
|
||||||
source $SCRIPT_DIR/setup.conf
|
|
||||||
>>>>>>> 44fb72cfdf009a9815f39848bc8aa7d8f7c8321b
|
|
||||||
bash 0-preinstall.sh
|
bash 0-preinstall.sh
|
||||||
arch-chroot /mnt /root/ArchTitus/1-setup.sh
|
arch-chroot /mnt /root/ArchTitus/1-setup.sh
|
||||||
arch-chroot /mnt /usr/bin/runuser -u "$USERNAME" -- /home/"$USERNAME"/ArchTitus/2-user.sh
|
arch-chroot /mnt /usr/bin/runuser -u "$USERNAME" -- /home/"$USERNAME"/ArchTitus/2-user.sh
|
||||||
arch-chroot /mnt /root/ArchTitus/3-post-setup.sh
|
arch-chroot /mnt /root/ArchTitus/3-post-setup.sh
|
||||||
<<<<<<< HEAD
|
|
||||||
logo
|
|
||||||
echo -ne "
|
|
||||||
=======
|
|
||||||
fi
|
|
||||||
echo -ne "
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
|
||||||
███████║██████╔╝██║ ███████║ ██║ ██║ ██║ ██║ ██║███████╗
|
|
||||||
██╔══██║██╔══██╗██║ ██╔══██║ ██║ ██║ ██║ ██║ ██║╚════██║
|
|
||||||
██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
|
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
||||||
>>>>>>> 44fb72cfdf009a9815f39848bc8aa7d8f7c8321b
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
Automated Arch Linux Installer
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
Done - Please Eject Install Media and Reboot
|
|
||||||
"
|
|
||||||
}
|
}
|
||||||
logo
|
logo
|
||||||
echo -ne "
|
echo -ne "
|
||||||
|
|
@ -77,3 +74,4 @@ echo -ne "
|
||||||
"
|
"
|
||||||
bash startup.sh
|
bash startup.sh
|
||||||
sequence |& tee "$LOG"
|
sequence |& tee "$LOG"
|
||||||
|
end
|
||||||
|
|
|
||||||
37
startup.sh
37
startup.sh
|
|
@ -22,14 +22,24 @@ set_option() {
|
||||||
|
|
||||||
check_root() {
|
check_root() {
|
||||||
if [[ "$(id -u)" != "0" ]]; then
|
if [[ "$(id -u)" != "0" ]]; then
|
||||||
echo -ne "ERROR! This script must be running under the 'root' user!"
|
echo -ne "ERROR! This script must be running under the 'root' user!\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_docker() {
|
||||||
|
if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then
|
||||||
|
echo -ne "ERROR! Docker container not supported (at the moment)\n"
|
||||||
|
exit 1
|
||||||
|
elif [[ -f /.dockerenv ]]; then
|
||||||
|
echo -ne "ERROR! Docker container not supported (at the moment)\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_arch() {
|
check_arch() {
|
||||||
if [[ ! -e /etc/arch-release ]]; then
|
if [[ ! -e /etc/arch-release ]]; then
|
||||||
echo -ne "ERROR! This script must be run in Arch Linux!"
|
echo -ne "ERROR! This script must be run in Arch Linux!\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -37,7 +47,7 @@ check_arch() {
|
||||||
check_pacman() {
|
check_pacman() {
|
||||||
if [[ -f /var/lib/pacman/db.lck ]]; then
|
if [[ -f /var/lib/pacman/db.lck ]]; then
|
||||||
echo "ERROR! Pacman is blocked."
|
echo "ERROR! Pacman is blocked."
|
||||||
echo "If not running remove /var/lib/pacman/db.lck."
|
echo -ne "If not running remove /var/lib/pacman/db.lck.\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -181,7 +191,7 @@ refresh_pacman() {
|
||||||
}
|
}
|
||||||
|
|
||||||
something_failed() {
|
something_failed() {
|
||||||
echo "ERROR! Something is not right. Exiting."
|
echo "ERROR! Something is not right. Exiting.\n"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -228,6 +238,7 @@ background_check() {
|
||||||
fi
|
fi
|
||||||
check_arch
|
check_arch
|
||||||
check_pacman
|
check_pacman
|
||||||
|
check_docker
|
||||||
efi_check
|
efi_check
|
||||||
check_root
|
check_root
|
||||||
set_ntp
|
set_ntp
|
||||||
|
|
@ -479,6 +490,22 @@ set_desktop() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_aur_helper() {
|
||||||
|
title "Select your preferred AUR helper"
|
||||||
|
SELECTION=("yay" "trizen" "aurman" "aura" "pikaur")
|
||||||
|
PS3="$PROMPT"
|
||||||
|
select OPT in "${SELECTION[@]}"; do
|
||||||
|
if elements_present "$OPT" "${SELECTION[@]}"; then
|
||||||
|
set_option "AURHELPER" "$OPT"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
invalid_option
|
||||||
|
set_aur_helper
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
set_bootloader() {
|
set_bootloader() {
|
||||||
title "Select your bootloader"
|
title "Select your bootloader"
|
||||||
SELECTION=("Default (GRUB)" "Systemd" "UEFI" "None")
|
SELECTION=("Default (GRUB)" "Systemd" "UEFI" "None")
|
||||||
|
|
@ -532,6 +559,7 @@ make_choice() {
|
||||||
set_option "LAYOUT" 1
|
set_option "LAYOUT" 1
|
||||||
set_option "BOOTLOADER" "grub"
|
set_option "BOOTLOADER" "grub"
|
||||||
set_option "FS" "btrfs"
|
set_option "FS" "btrfs"
|
||||||
|
set_option "AURHELPER" "yay"
|
||||||
set_option "DESKTOP" "default"
|
set_option "DESKTOP" "default"
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
@ -548,6 +576,7 @@ make_choice() {
|
||||||
set_keymap
|
set_keymap
|
||||||
ssd_drive
|
ssd_drive
|
||||||
# Advance options
|
# Advance options
|
||||||
|
set_aur_helper
|
||||||
set_partion_layout
|
set_partion_layout
|
||||||
set_bootloader
|
set_bootloader
|
||||||
set_filesystem
|
set_filesystem
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue