24
build.zsh
24
build.zsh
@@ -5,6 +5,7 @@ set -e
|
||||
ROOTFS="$(pwd)/root.x86_64"
|
||||
BUILD_MODE="${1:-tarball}"
|
||||
BUILD_DATE=$(date +%Y.%m.%d)
|
||||
GPG_KEY=B6A582E551A2F6181A5CC99E338E6F42F9544D9B
|
||||
|
||||
echo "=== aios build $BUILD_DATE (mode: $BUILD_MODE) ==="
|
||||
|
||||
@@ -24,13 +25,6 @@ echo 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' > $ROOTFS/etc/pac
|
||||
sed -i 's/CheckSpace/#CheckSpace/' $ROOTFS/etc/pacman.conf
|
||||
sed -i '/\[options\]/a NoUpgrade = etc/os-release' $ROOTFS/etc/pacman.conf
|
||||
|
||||
cat >> $ROOTFS/etc/pacman.conf <<'EOF'
|
||||
|
||||
[aios]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = https://git.syui.ai/ai/repo/raw/branch/main/$arch
|
||||
EOF
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman-key --init && pacman-key --populate archlinux'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -Syu --noconfirm base-devel vim git zsh rust clang openssh jq nodejs npm zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search'
|
||||
|
||||
@@ -40,7 +34,21 @@ fi
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'npm i -g @anthropic-ai/claude-code'
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -Sy --noconfirm ailog aigpt aishell'
|
||||
cat >> $ROOTFS/etc/pacman.conf <<'EOF'
|
||||
|
||||
[aios]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Server = https://git.syui.ai/ai/repo/raw/branch/main/$arch
|
||||
EOF
|
||||
|
||||
mv cfg/aios.gpg $ROOTFS/aios.gpg
|
||||
arch-chroot $ROOTFS /bin/sh -c "
|
||||
# curl -sL https://git.syui.ai/ai/repo/raw/branch/main/aios.gpg -o /tmp/aios.gpg
|
||||
pacman-key --add /aios.gpg
|
||||
pacman-key --lsign-key $GPG_KEY
|
||||
rm /aios.gpg
|
||||
"
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -S --noconfirm ailog aigpt aishell'
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'chsh -s /bin/zsh'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'useradd -m -G wheel -s /bin/zsh ai'
|
||||
|
||||
BIN
cfg/aios.gpg
Normal file
BIN
cfg/aios.gpg
Normal file
Binary file not shown.
Reference in New Issue
Block a user