os/build.zsh

21 lines
1.2 KiB
Bash
Raw Normal View History

2024-02-08 10:04:45 +00:00
#!/bin/zsh
2024-02-12 01:18:52 +00:00
pacman -Syuu --noconfirm base-devel archiso docker git
2024-02-08 10:04:45 +00:00
git clone https://gitlab.archlinux.org/archlinux/archiso
2024-02-12 01:18:52 +00:00
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
2024-02-21 13:45:41 +00:00
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
2024-02-12 01:18:52 +00:00
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
2024-02-08 10:04:45 +00:00
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
2024-02-21 13:45:41 +00:00
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go'
2024-02-12 01:18:52 +00:00
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
2024-02-08 10:04:45 +00:00
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
2024-02-12 01:18:52 +00:00
tar -zcvf aios-bootstrap.tar.gz root.x86_64/