Created
February 6, 2021 09:38
-
-
Save jeffmhubbard/0dda1aed8e96e2fe2df01337fdc435d5 to your computer and use it in GitHub Desktop.
Arch install script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
script=$0 | |
chroot=/mnt | |
function stage1 { | |
# prepare disks and pacstrap... | |
script2=${script:t} | |
install -Dm755 $script $chroot/$script2 | |
arch-chroot $chroot /$script2 --chroot | |
rm $chroot/$script2 | |
umount -R $chroot | |
swapoff -a | |
} | |
function stage2 { | |
# configure system | |
passwd || passwd | |
} | |
case $1 in | |
--chroot) stage2;; | |
*) stage1;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment