-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
50 lines (40 loc) · 1.41 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/bash
# Prepare space for logs
mkdir logs/
touch logs/arch_install_script.log
message="
############################################################
#
# ArchLinux install script...
#
############################################################
"
echo $message > >(tee -a logs/arch_install_script.log)
chmod +x envs.sh
chmod -R +x scripts/
# Load variables
source envs.sh
# Miscellaneous instruction
timedatectl set-ntp true
# Run scripts
source scripts/partitions.sh > >(tee -a logs/arch_install_script.log)
source scripts/encryption.sh > >(tee -a logs/arch_install_script.log)
source scripts/formatting.sh > >(tee -a logs/arch_install_script.log)
source scripts/mounting.sh > >(tee -a logs/arch_install_script.log)
source scripts/pacstrap.sh > >(tee -a logs/arch_install_script.log)
# Miscellaneous instructions
genfstab -U /mnt >> /mnt/etc/fstab
mkdir -p /mnt/root/scripts/
cp envs.sh /mnt/root/scripts/envs.sh
cp scripts/arch-chroot.sh /mnt/root/scripts/arch-chroot.sh
ln -sf /run/systemd/resolve/stub-resolve.conf /mnt/etc/resolv.conf
arch-chroot /mnt /root/scripts/arch-chroot.sh > >(tee -a logs/arch_install_script.log)
source scripts/cleanup.sh > >(tee -a logs/arch_install_script.log)
message="
############################################################
#
# Done installing ArchLinux. Goodbye!
#
############################################################
"
echo $message > >(tee -a logs/arch_install_script.log)