2024-10-02 10:16:47 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-10-02 21:25:02 -05:00
|
|
|
#echo '
|
|
|
|
#[askiiart]
|
|
|
|
#SigLevel = Optional
|
|
|
|
#Server = https://askiiart.net/repos/archlinux/$arch' >> /etc/pacman.conf
|
2024-10-02 10:19:32 -05:00
|
|
|
|
2024-10-02 10:20:36 -05:00
|
|
|
pacman -Sy archiso git grub --noconfirm
|
2024-10-02 10:16:47 -05:00
|
|
|
git clone https://git.blendos.co/blendOS/image-builder.git
|
2024-10-02 21:25:02 -05:00
|
|
|
cd ./image-builder/
|
|
|
|
sed -i 's/https:\/\/pkg-repo\.blendos\.co/https:\/\/askiiart.net\/repos\/archlinux\/$arch\nSigLevel = Optional/g' ./pacman.conf
|
|
|
|
sed -i 's/https:\/\/pkg-repo\.blendos\.co/https:\/\/askiiart.net\/repos\/archlinux\/$arch\nSigLevel = Optional/g' ./airootfs/etc/pacman.conf
|
2024-11-07 22:58:09 -06:00
|
|
|
sed -i 's/e2fsprogs/e2fsprogs\nefibootmgr/g' ./packages.x86_64
|
2024-10-02 21:25:02 -05:00
|
|
|
|
2024-10-02 10:19:32 -05:00
|
|
|
mkarchiso -v -w workdir/ -o out/ .
|
2024-10-02 10:16:47 -05:00
|
|
|
|
|
|
|
cd ./out/
|
|
|
|
filename=$(find . -mindepth 1 -maxdepth 1 -name "blendOS-*.iso")
|
|
|
|
date=${filename%-*}
|
|
|
|
date=${date#*-}
|
|
|
|
mkdir /iso/$date/
|
|
|
|
cp -r $filename /iso/$date/
|
|
|
|
|
|
|
|
cd /iso/
|
|
|
|
num=$(find . -mindepth 1 -maxdepth 1 -name 'blendOS-*' -type d | wc -l)
|
|
|
|
echo $num
|
|
|
|
if [ $(($num - 3)) -ge 1 ]; then
|
2024-10-07 19:02:14 -05:00
|
|
|
rm -rf $(find . -mindepth 1 -maxdepth 1 -type d | sort | tail -n $(($num - 3)))
|
2024-10-02 10:16:47 -05:00
|
|
|
fi
|
|
|
|
|
2024-10-07 19:02:14 -05:00
|
|
|
ln -sf $date /iso/latest
|