feat: copy chroot to /mnt/

This commit is contained in:
ange 2024-05-25 15:59:32 +02:00
parent 2f3664acaa
commit 0a2b926e9d
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
16 changed files with 27 additions and 13 deletions

View File

@ -12,3 +12,8 @@ cd archinstall
$EDITOR config
./install.sh
```
## Extend
If you want to extend this script, simply place your own commands in a `.sh`
file in `modules/{prechroot,chroot,chroot/user}` respectively depending on when
you need it to be executed.

View File

@ -4,5 +4,4 @@ set -a
. ./config
set +a
# cp chroot?
bash ./modules/"$install_type".sh

View File

@ -1,14 +1,23 @@
#!/bin/bash
#shellcheck disable=SC2154
for i in modules/00-prechroot/*.sh; do
cp ./modules/chroot/ /mnt/
for i in *.sh; do
bash -x "$i"
done
for i in modules/10-chroot/*.sh; do
arch-chroot /mnt/ bash -x "$i"
(cd ./modules/ || exit
for i in ./chroot/*.sh; do
arch-chroot /mnt/ bash -x "/$i"
done
for i in modules/20-user/*.sh; do
arch-chroot /mnt/ sudo -u "$username" bash -x "$i"
for i in ./chroot/user/*.sh; do
arch-chroot /mnt/ sudo -u "$username" bash -x "/$i"
done
)
for i in ./modules/postchroot/*.sh; do
bash -x "$i"
done
rm -rf /mnt/chroot/

View File

@ -0,0 +1,4 @@
#!/bin/bash
git clone --depth 1 https://git.maby.dev/ange/.dotfiles.git /tmp/dotfiles
/dotfiles/.config/suckless/update.sh

View File

@ -40,6 +40,5 @@ case "$(lspci | grep 'VGA\|3D')" in
*) ;;
esac
find ./modules/ -name '*.sh.desktop' -exec rename '.desktop' '' '{}' +
bash ./modules/base.sh
xdg-user-dirs-update

View File

@ -22,7 +22,5 @@ case "$(lsmod)" in
;;
esac
find ./modules/ -name '*.sh.dwm' -exec rename '.dwm' '' '{}' +
bash ./modules/desktop.sh
git clone --depth 1 https://git.maby.dev/ange/.dotfiles.git dotfiles
arch-chroot /mnt/ bash -x ./dotfiles/.config/suckless/update.sh

View File

@ -10,7 +10,7 @@ boot=/dev/disk/by-partlabel/boot
root=/dev/disk/by-partlabel/root
[ -n "$disk_passwd" ] && {
echo -n "$disk_passwd" | cryptsetup luksFormat "$root" -
echo -n - "$disk_passwd" | cryptsetup luksFormat "$root" -
cryptsetup open "$root" cryptroot - <<< "$disk_passwd"
root=/dev/mapper/cryptroot
}