Skip to content

Instantly share code, notes, and snippets.

@jeffmhubbard
Created February 6, 2021 09:38
Show Gist options
  • Save jeffmhubbard/0dda1aed8e96e2fe2df01337fdc435d5 to your computer and use it in GitHub Desktop.
Save jeffmhubbard/0dda1aed8e96e2fe2df01337fdc435d5 to your computer and use it in GitHub Desktop.
Arch install script
#!/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