Compare commits
6 Commits
main
...
6956433169
| Author | SHA1 | Date | |
|---|---|---|---|
|
6956433169
|
|||
|
41bc4f13ca
|
|||
|
1bad33b6f2
|
|||
|
36789ddd3c
|
|||
|
28dcd9cb69
|
|||
|
ad23cc929b
|
@@ -1,6 +1,5 @@
|
||||
# https://github.com/containers/shortnames
|
||||
# ~/.config/containers/registries.conf.d/ai.conf
|
||||
unqualified-search-registries=["git.syui.ai", "docker.io", "ghcr.io"]
|
||||
unqualified-search-registries=["git.syui.ai", "docker.io"]
|
||||
|
||||
[aliases]
|
||||
"aios"="git.syui.ai/ai/os"
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
name: release
|
||||
name: build and push image
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
push:
|
||||
|
||||
env:
|
||||
TAG: latest
|
||||
IMAGE_ID: aios
|
||||
IMAGE_NAME: ${{ gitea.repository }}
|
||||
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||
REGISTRY: localhost:8088
|
||||
GITEA_URL: https://git.syui.ai
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -18,21 +20,11 @@ jobs:
|
||||
image: ghcr.io/syui/aios
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Pull and push to local registry
|
||||
- name: Initialize
|
||||
run: |
|
||||
pacman -Sy --noconfirm docker
|
||||
pacman -Syuu --noconfirm base-devel archiso docker git curl
|
||||
docker pull ghcr.io/syui/aios
|
||||
docker tag ghcr.io/syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||
|
||||
- name: Create release
|
||||
run: |
|
||||
existing=$(curl -s -H "Authorization: token ${{ env.APP_TOKEN }}" "${{ env.GITEA_URL }}/api/v1/repos/${{ env.IMAGE_NAME }}/releases/tags/${{ env.TAG }}" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
||||
if [ -n "$existing" ]; then
|
||||
curl -s -X DELETE -H "Authorization: token ${{ env.APP_TOKEN }}" "${{ env.GITEA_URL }}/api/v1/repos/${{ env.IMAGE_NAME }}/releases/$existing"
|
||||
fi
|
||||
git tag -f ${{ env.TAG }} 2>/dev/null || true
|
||||
curl -s -X POST -H "Authorization: token ${{ env.APP_TOKEN }}" -H "Content-Type: application/json" \
|
||||
-d '{"tag_name":"${{ env.TAG }}","name":"${{ env.TAG }}","body":"build '$(date +%Y.%m.%d)'\n\ndownload: https://github.com/syui/aios/releases/download/latest/aios.tar.gz"}' \
|
||||
"${{ env.GITEA_URL }}/api/v1/repos/${{ env.IMAGE_NAME }}/releases"
|
||||
|
||||
73
.github/workflows/release.yml
vendored
73
.github/workflows/release.yml
vendored
@@ -2,48 +2,71 @@ name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build aios
|
||||
- name: Initialize
|
||||
run: |
|
||||
docker run --rm --privileged \
|
||||
-v ${{ github.workspace }}:/work -w /work \
|
||||
archlinux:latest \
|
||||
bash -c "pacman -Sy --noconfirm arch-install-scripts zsh && zsh ./build.zsh"
|
||||
|
||||
- name: Push to Docker Hub
|
||||
run: |
|
||||
cat aios.tar.gz | docker import - syui/aios
|
||||
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
|
||||
git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||
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
|
||||
mkdir -p root.x86_64/var/lib/machines/arch
|
||||
pacstrap -c root.x86_64/var/lib/machines/arch base
|
||||
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
|
||||
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'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||
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'
|
||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
||||
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
|
||||
docker push syui/aios
|
||||
docker push ${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Push to GitHub Container Registry
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ env.GITHUB_TOKEN }}
|
||||
- name: github container registry
|
||||
run: |
|
||||
echo "${{ env.APP_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
docker tag syui/aios ghcr.io/syui/aios
|
||||
docker push ghcr.io/syui/aios
|
||||
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Create new release
|
||||
env:
|
||||
GH_TOKEN: ${{ env.APP_TOKEN }}
|
||||
run: |
|
||||
gh release delete latest --yes --cleanup-tag || true
|
||||
git tag -f latest
|
||||
git push -f origin latest
|
||||
gh release create latest aios.tar.gz --title "latest" --notes "build $(date +%Y.%m.%d)" --target main
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: latest
|
||||
tag_name: latest
|
||||
files:
|
||||
aios-bootstrap.tar.gz
|
||||
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,10 +1,2 @@
|
||||
/.config/ai
|
||||
/claude.md
|
||||
/CLAUDE.md
|
||||
.config/ai
|
||||
**.DS_Store
|
||||
aios-bootstrap*.tar.gz
|
||||
root.x86_64/
|
||||
archiso/
|
||||
build.log
|
||||
.claude
|
||||
/cfg/repo.sh
|
||||
|
||||
111
README.md
111
README.md
@@ -1,7 +1,112 @@
|
||||
# aios
|
||||
# <img src="./icon/ai.png" width="30"> ai `os`
|
||||
|
||||
`aios` is a simple linux distribution based on `archlinux`.
|
||||
|
||||
|rule|var|
|
||||
|---|---|
|
||||
|name|ai os|
|
||||
|code|aios|
|
||||
|id|ai|
|
||||
|container|[git.syui.ai/ai/os](https://git.syui.ai/ai/-/packages/container/os/latest)|
|
||||
|image|[aios-bootstrap.tar.gz](https://github.com/syui/aios/releases/download/latest/aios-bootstrap.tar.gz)|
|
||||
|
||||
```sh
|
||||
AI: claude
|
||||
- os: archlinux(systemd-nspawn, pacman)
|
||||
$ docker run -it git.syui.ai/ai/os ai
|
||||
```
|
||||
|
||||
## link
|
||||
|
||||
|host|command|url|
|
||||
|---|---|---|
|
||||
|docker|syui/aios|https://hub.docker.com/r/syui/aios|
|
||||
|github|ghcr.io/syui/aios|https://github.com/users/syui/packages/container/package/aios|
|
||||
|syui|git.syui.ai/ai/os|https://git.syui.ai/ai/-/packages/container/os|
|
||||
|
||||
## base
|
||||
|
||||
```sh
|
||||
# https://gitlab.archlinux.org/archlinux
|
||||
$ git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||
```
|
||||
|
||||
## docker
|
||||
|
||||
```sh
|
||||
# https://git.syui.ai/ai/-/packages/container/os
|
||||
$ docker run -it git.syui.ai/ai/os ai
|
||||
|
||||
# https://hub.docker.com/r/syui/aios
|
||||
$ docekr run -it syui/aios ai
|
||||
|
||||
# https://github.com/users/syui/packages/container/package/aios
|
||||
$ docker run -it ghcr.io/syui/aios ai
|
||||
```
|
||||
|
||||
## token
|
||||
|
||||
|env|body|
|
||||
|---|---|
|
||||
|${{ github.repository }}|syui/aios|
|
||||
|${{ secrets.DOCKER_USERNAME }}|syui|
|
||||
|${{ secrets.DOCKER_TOKEN }}|[token](https://matsuand.github.io/docs.docker.jp.onthefly/docker-hub/access-tokens/)|
|
||||
|${{ secrets.APP_TOKEN }}|[token](https://docs.github.com/ja/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens), pacakge|
|
||||
|
||||
## podman
|
||||
|
||||
```sh
|
||||
if [ ! -d ~/ai/os/.git ];then
|
||||
mkdir -p ~/ai
|
||||
git clone https://git.syui.ai/ai/os ~/ai/os
|
||||
else
|
||||
cd ~/ai/os
|
||||
fi
|
||||
if [ ! -d ~/.config/containers/registries.conf.d ];then
|
||||
mkdir -p ~/.config/containers/registries.conf.d
|
||||
fi
|
||||
ln -s `pwd`/.config/containers/registries.conf.d/ai.conf ~/.config/containers/registries.conf.d/ai.conf
|
||||
```
|
||||
|
||||
```sh
|
||||
$ podman pull aios
|
||||
```
|
||||
|
||||
> ~/.config/containers/registries.conf.d/ai.conf
|
||||
|
||||
```sh
|
||||
# https://github.com/containers/shortnames
|
||||
# ~/.config/containers/registries.conf.d/ai.conf
|
||||
unqualified-search-registries = ['git.syui.ai', 'docker.io', 'ghcr.io']
|
||||
|
||||
[aliases]
|
||||
"aios" = "git.syui.ai/ai/os"
|
||||
```
|
||||
|
||||
```sh
|
||||
$ podman pull aios
|
||||
Resolved "aios" as an alias (/etc/containers/registries.conf.d/ai.conf)
|
||||
Trying to pull git.syui.ai/ai/os:latest...
|
||||
Getting image source signatures
|
||||
Copying blob c7e55fecf0be [====================>-----------------] 917.4MiB / 1.7GiB
|
||||
```
|
||||
|
||||
## cron
|
||||
|
||||
stop
|
||||
|
||||
```sh
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
```
|
||||
|
||||
## update action
|
||||
|
||||
```sh
|
||||
$ vim build.zszh
|
||||
$ ./scpt/gh-actions.zsh
|
||||
```
|
||||
|
||||
## link
|
||||
|
||||
- https://git.syui.ai/ai/os
|
||||
- https://github.com/syui/aios
|
||||
|
||||
|
||||
108
build.zsh
108
build.zsh
@@ -1,88 +1,22 @@
|
||||
#!/bin/zsh
|
||||
|
||||
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) ==="
|
||||
|
||||
rm -rf $ROOTFS
|
||||
mkdir -p $ROOTFS
|
||||
|
||||
# --- rootfs構築 (共通) ---
|
||||
|
||||
pacstrap -c $ROOTFS base
|
||||
|
||||
# pacman.conf がない場合はホストからコピー
|
||||
if [[ ! -f $ROOTFS/etc/pacman.conf ]]; then
|
||||
cp /etc/pacman.conf $ROOTFS/etc/pacman.conf
|
||||
fi
|
||||
|
||||
echo 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' > $ROOTFS/etc/pacman.d/mirrorlist
|
||||
sed -i 's/CheckSpace/#CheckSpace/' $ROOTFS/etc/pacman.conf
|
||||
sed -i '/\[options\]/a NoUpgrade = etc/os-release' $ROOTFS/etc/pacman.conf
|
||||
|
||||
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'
|
||||
|
||||
if [[ "$BUILD_MODE" == "image" ]]; then
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -S --noconfirm linux linux-firmware mkinitcpio'
|
||||
fi
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'npm i -g @anthropic-ai/claude-code'
|
||||
|
||||
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 "
|
||||
pacman-key --add /aios.gpg
|
||||
pacman-key --lsign-key $GPG_KEY
|
||||
rm /aios.gpg
|
||||
"
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -Sy --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'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'echo "ai:ai" | chpasswd'
|
||||
echo "ai ALL=(ALL:ALL) NOPASSWD: ALL" >> $ROOTFS/etc/sudoers
|
||||
|
||||
mkdir -p $ROOTFS/etc/systemd/system/console-getty.service.d
|
||||
cat > $ROOTFS/etc/systemd/system/console-getty.service.d/override.conf <<'EOF'
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/usr/bin/agetty --autologin ai --noclear --keep-baud console 115200,38400,9600 $TERM
|
||||
EOF
|
||||
|
||||
cp cfg/zshrc $ROOTFS/home/ai/.zshrc
|
||||
arch-chroot $ROOTFS /bin/sh -c 'chown ai:ai /home/ai/.zshrc'
|
||||
|
||||
cat > $ROOTFS/etc/os-release <<EOF
|
||||
NAME=aios
|
||||
PRETTY_NAME=aios
|
||||
ID=ai
|
||||
ID_LIKE=arch
|
||||
BUILD_ID=rolling
|
||||
IMAGE_ID=aios
|
||||
IMAGE_VERSION=0.0.1
|
||||
HOME_URL=https://git.syui.ai/ai/os
|
||||
EOF
|
||||
|
||||
echo "aios" > $ROOTFS/etc/hostname
|
||||
|
||||
# --- 出力 ---
|
||||
|
||||
if [[ "$BUILD_MODE" == "image" ]]; then
|
||||
bash cfg/image.sh $ROOTFS
|
||||
echo "=== build complete: aios.img ==="
|
||||
else
|
||||
tar czf aios.tar.gz -C $ROOTFS .
|
||||
echo "=== build complete: aios.tar.gz ==="
|
||||
fi
|
||||
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
|
||||
git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||
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
|
||||
mkdir -p root.x86_64/var/lib/machines/arch
|
||||
pacstrap -c root.x86_64/var/lib/machines/arch base
|
||||
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
|
||||
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'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||
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'
|
||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||
|
||||
4
cfg/ai.conf
Normal file
4
cfg/ai.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
unqualified-search-registries = ['docker.io', 'git.syui.ai', 'ghcr.io']
|
||||
|
||||
[aliases]
|
||||
"aios" = "git.syui.ai/ai/os"
|
||||
BIN
cfg/aios.gpg
BIN
cfg/aios.gpg
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
[Exec]
|
||||
Boot=yes
|
||||
|
||||
[Network]
|
||||
Private=no
|
||||
72
cfg/gh-actions.yml
Normal file
72
cfg/gh-actions.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Initialize
|
||||
run: |
|
||||
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
|
||||
git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||
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
|
||||
mkdir -p root.x86_64/var/lib/machines/arch
|
||||
pacstrap -c root.x86_64/var/lib/machines/arch base
|
||||
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
|
||||
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'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||
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'
|
||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
||||
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
|
||||
docker push ${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ env.GITHUB_TOKEN }}
|
||||
- name: github container registry
|
||||
run: |
|
||||
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Create new release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: latest
|
||||
tag_name: latest
|
||||
files:
|
||||
aios-bootstrap.tar.gz
|
||||
|
||||
1
cfg/hostname
Normal file
1
cfg/hostname
Normal file
@@ -0,0 +1 @@
|
||||
aios
|
||||
89
cfg/image.sh
89
cfg/image.sh
@@ -1,89 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ROOTFS="$1"
|
||||
IMG="aios.img"
|
||||
IMG_SIZE="4G"
|
||||
ESP_SIZE=512 # MiB
|
||||
LOOP=""
|
||||
|
||||
cleanup() {
|
||||
set +e
|
||||
umount -R /mnt/aios 2>/dev/null
|
||||
[[ -n "$LOOP" ]] && losetup -d "$LOOP" 2>/dev/null
|
||||
rmdir /mnt/aios 2>/dev/null
|
||||
set -e
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
if [[ -z "$ROOTFS" || ! -d "$ROOTFS" ]]; then
|
||||
echo "Usage: $0 <rootfs-dir>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f "$IMG"
|
||||
|
||||
echo "--- Creating raw image ($IMG_SIZE) ---"
|
||||
fallocate -l "$IMG_SIZE" "$IMG"
|
||||
|
||||
echo "--- Partitioning (GPT: ESP + root) ---"
|
||||
sgdisk -Z "$IMG"
|
||||
sgdisk -n 1:0:+${ESP_SIZE}M -t 1:EF00 -c 1:"ESP" "$IMG"
|
||||
sgdisk -n 2:0:0 -t 2:8300 -c 2:"root" "$IMG"
|
||||
|
||||
echo "--- Setting up loop device ---"
|
||||
LOOP=$(losetup --find --show --partscan "$IMG")
|
||||
PART_ESP="${LOOP}p1"
|
||||
PART_ROOT="${LOOP}p2"
|
||||
|
||||
# Wait for partition devices
|
||||
udevadm settle
|
||||
sleep 1
|
||||
|
||||
echo "--- Formatting partitions ---"
|
||||
mkfs.fat -F 32 "$PART_ESP"
|
||||
mkfs.ext4 -F "$PART_ROOT"
|
||||
|
||||
echo "--- Mounting and copying rootfs ---"
|
||||
mkdir -p /mnt/aios
|
||||
mount "$PART_ROOT" /mnt/aios
|
||||
mkdir -p /mnt/aios/boot
|
||||
mount "$PART_ESP" /mnt/aios/boot
|
||||
|
||||
cp -a "$ROOTFS"/. /mnt/aios/
|
||||
|
||||
echo "--- Generating fstab ---"
|
||||
genfstab -U /mnt/aios > /mnt/aios/etc/fstab
|
||||
|
||||
echo "--- Installing systemd-boot ---"
|
||||
arch-chroot /mnt/aios bootctl install
|
||||
|
||||
echo "--- Creating boot entry ---"
|
||||
ROOT_UUID=$(blkid -s UUID -o value "$PART_ROOT")
|
||||
|
||||
mkdir -p /mnt/aios/boot/loader/entries
|
||||
|
||||
cat > /mnt/aios/boot/loader/loader.conf <<'EOF'
|
||||
default aios.conf
|
||||
timeout 3
|
||||
console-mode max
|
||||
EOF
|
||||
|
||||
cat > /mnt/aios/boot/loader/entries/aios.conf <<EOF
|
||||
title aios
|
||||
linux /vmlinuz-linux
|
||||
initrd /initramfs-linux.img
|
||||
options root=UUID=$ROOT_UUID rw
|
||||
EOF
|
||||
|
||||
echo "--- Generating initramfs ---"
|
||||
arch-chroot /mnt/aios mkinitcpio -P
|
||||
|
||||
echo "--- Unmounting ---"
|
||||
umount -R /mnt/aios
|
||||
losetup -d "$LOOP"
|
||||
LOOP=""
|
||||
rmdir /mnt/aios 2>/dev/null
|
||||
|
||||
echo "--- $IMG ready ---"
|
||||
13
cfg/os-release
Normal file
13
cfg/os-release
Normal file
@@ -0,0 +1,13 @@
|
||||
BUILD_ID=rolling
|
||||
ANSI_COLOR="38;2;23;147;209"
|
||||
IMAGE_ID=aios
|
||||
IMAGE_VERSION=2024.02.11
|
||||
NAME=ai os
|
||||
PRETTY_NAME=ai os
|
||||
ID=ai
|
||||
HOME_URL=https://git.syui.ai/ai/os
|
||||
DOCUMENTATION_URL=https://git.syui.ai/ai/os/wiki
|
||||
SUPPORT_URL=https://git.syui.ai/ai/os/issues
|
||||
BUG_REPORT_URL=https://git.syui.ai/ai/os/issues
|
||||
PRIVACY_POLICY_URL=https://git.syui.ai/ai/os
|
||||
LOGO=ai-logo
|
||||
27
cfg/profiledef.sh
Normal file
27
cfg/profiledef.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
iso_name="aios"
|
||||
iso_label="AI_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
||||
iso_publisher="ai os <https://git.syui.ai/ai/os>"
|
||||
iso_application="ai os Live/Rescue DVD"
|
||||
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
||||
install_dir="ai"
|
||||
#buildmodes=('iso')
|
||||
buildmodes=('bootstrap')
|
||||
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
|
||||
'uefi-ia32.grub.esp' 'uefi-x64.grub.esp'
|
||||
'uefi-ia32.grub.eltorito' 'uefi-x64.grub.eltorito')
|
||||
arch="x86_64"
|
||||
pacman_conf="pacman.conf"
|
||||
airootfs_image_type="squashfs"
|
||||
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
|
||||
file_permissions=(
|
||||
["/etc/shadow"]="0:0:400"
|
||||
["/root"]="0:0:750"
|
||||
["/root/.automated_script.sh"]="0:0:755"
|
||||
["/root/.gnupg"]="0:0:700"
|
||||
["/usr/local/bin/choose-mirror"]="0:0:755"
|
||||
["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||
["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||
)
|
||||
37
cfg/zshrc
37
cfg/zshrc
@@ -1,37 +0,0 @@
|
||||
export PATH=$HOME/.cargo/bin:$PATH
|
||||
|
||||
alias u="sudo pacman -Syu --noconfirm"
|
||||
alias zs="vim ~/.zshrc"
|
||||
alias zr="exec $SHELL && source ~/.zshrc"
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
fpath=(/usr/share/zsh/site-functions $fpath)
|
||||
|
||||
#source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=~/.zsh_history
|
||||
setopt SHARE_HISTORY
|
||||
setopt HIST_IGNORE_DUPS
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
if [[ -o login ]] && [[ -o interactive ]] && command -v aishell &>/dev/null; then
|
||||
exec aishell
|
||||
fi
|
||||
|
||||
function setup() {
|
||||
ailog setup
|
||||
# --- login ---
|
||||
# ailog oauth $handle
|
||||
# ailog oauth $handle_bot --bot
|
||||
# --- login ---
|
||||
ailog gpt core -d
|
||||
ailog gpt memory -d
|
||||
aigpt setup
|
||||
claude
|
||||
}
|
||||
125
docs/wiki.md
Normal file
125
docs/wiki.md
Normal file
@@ -0,0 +1,125 @@
|
||||
### archiso
|
||||
|
||||
- [profile.rst](https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/docs/README.profile.rst)
|
||||
|
||||
```sh
|
||||
$ pacman -S archiso
|
||||
```
|
||||
|
||||
```sh
|
||||
$ git clone https://git.syui.ai/ai/os
|
||||
$ cd os
|
||||
$ git clone https://gitlab.archlinux.org/archlinux/archlinux-docker
|
||||
$ git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||
|
||||
$ vim ./archiso/configs/releng/profiledef.sh
|
||||
|
||||
$ mkarchiso -v -o ./ ./archiso/configs/releng
|
||||
```
|
||||
|
||||
### system
|
||||
|
||||
> ./archiso/configs/releng/profiledef.sh
|
||||
|
||||
```sh
|
||||
buildmodes=('bootstrap')
|
||||
```
|
||||
|
||||
```sh
|
||||
$ mkarchiso -v -o ./ ./archiso/configs/releng
|
||||
$ tar xf aios-bootstrap*.tar.gz
|
||||
$ echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch\nServer = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
|
||||
$ sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
||||
$ arch-chroot ./root.x86_64
|
||||
---
|
||||
$ pacman -S base base-devel linux vim git zsh rust
|
||||
$ pacman-key --init
|
||||
$ pacman-key --populate archlinux
|
||||
$ exit
|
||||
---
|
||||
$ tar -C root.x86_64 -c . | docker import - syui/aios
|
||||
$ docker images
|
||||
|
||||
$ docker run --rm syui/aios cargo version
|
||||
cargo 1.75.0
|
||||
```
|
||||
|
||||
### gh-actions
|
||||
|
||||
[.github/workflows/push.yml](https://docs.github.com/en/enterprise-cloud@latest/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions)
|
||||
|
||||
```yml
|
||||
name: Demo Push
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- seed
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: ghtoken_product_demo
|
||||
|
||||
jobs:
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
|
||||
- name: Log in to registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
|
||||
- name: Push image
|
||||
run: |
|
||||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
[ "$VERSION" == "main" ] && VERSION=latest
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
```
|
||||
|
||||
### github-token
|
||||
|
||||
```yml
|
||||
env:
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ env.GITHUB_TOKEN }}
|
||||
- name: github container registry
|
||||
run: |
|
||||
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
```
|
||||
|
||||
```sh
|
||||
# make gh-actions
|
||||
$ vim ./build.zsh
|
||||
$ ./scpt/gh-actions.zsh
|
||||
```
|
||||
BIN
icon/ai.png
Normal file
BIN
icon/ai.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
BIN
icon/avatar.png
Normal file
BIN
icon/avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 557 KiB |
BIN
icon/wall.png
Normal file
BIN
icon/wall.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 149 KiB |
25
install.sh
25
install.sh
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
NAME="aios"
|
||||
TARBALL="aios.tar.gz"
|
||||
DEST="/var/lib/machines/$NAME"
|
||||
|
||||
if [[ ! -f "$TARBALL" ]]; then
|
||||
echo "error: $TARBALL not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=== aios install ==="
|
||||
|
||||
mkdir -p "$DEST"
|
||||
tar xzf "$TARBALL" -C "$DEST"
|
||||
|
||||
mkdir -p /etc/systemd/nspawn
|
||||
cp cfg/aios.nspawn /etc/systemd/nspawn/$NAME.nspawn
|
||||
|
||||
echo "=== install complete ==="
|
||||
echo ""
|
||||
echo " sudo machinectl start $NAME"
|
||||
echo " sudo machinectl shell $NAME /bin/su - ai"
|
||||
@@ -1,24 +0,0 @@
|
||||
pkgname=aigpt
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc='ai memory and personality system for aios'
|
||||
arch=('x86_64')
|
||||
url='https://git.syui.ai/ai/gpt'
|
||||
license=('MIT')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('rust' 'cargo' 'git')
|
||||
options=('!lto')
|
||||
source=("git+https://git.syui.ai/ai/gpt.git#branch=main")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd gpt
|
||||
export CC=gcc
|
||||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd gpt
|
||||
install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
pkgname=ailog
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc='atproto blog cli for aios'
|
||||
arch=('x86_64')
|
||||
url='https://git.syui.ai/ai/log'
|
||||
license=('MIT')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('rust' 'cargo' 'git')
|
||||
options=('!lto')
|
||||
source=("git+https://git.syui.ai/ai/log.git#branch=main")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd log
|
||||
export CC=gcc
|
||||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd log
|
||||
install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
pkgname=aishell
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc='custom shell for aios'
|
||||
arch=('x86_64')
|
||||
url='https://git.syui.ai/ai/shell'
|
||||
license=('MIT')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('rust' 'cargo' 'git')
|
||||
options=('!lto')
|
||||
source=("git+https://git.syui.ai/ai/shell.git#branch=main")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd shell
|
||||
export CC=gcc
|
||||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd shell
|
||||
install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
}
|
||||
71
scpt/gh-actions.zsh
Executable file
71
scpt/gh-actions.zsh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/bin/zsh
|
||||
|
||||
d=${0:a:h}
|
||||
dd=${0:a:h:h}
|
||||
|
||||
yml_a='name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Initialize
|
||||
run: |'
|
||||
|
||||
yml_c=' tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
||||
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
|
||||
docker push ${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ env.GITHUB_TOKEN }}
|
||||
- name: github container registry
|
||||
run: |
|
||||
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Create new release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: latest
|
||||
tag_name: latest
|
||||
files:
|
||||
aios-bootstrap.tar.gz
|
||||
'
|
||||
|
||||
yml_b=`cat $dd/build.zsh |sed '1d'`
|
||||
|
||||
echo $yml_a >! $dd/cfg/gh-actions.yml
|
||||
echo $yml_b|sed 's/^/ /g' >> $dd/cfg/gh-actions.yml
|
||||
echo $yml_c >> $dd/cfg/gh-actions.yml
|
||||
cat $dd/cfg/gh-actions.yml
|
||||
|
||||
echo '#!/bin/zsh' >! $dd/build.zsh
|
||||
echo $yml_b >> $dd/build.zsh
|
||||
cat $dd/build.zsh
|
||||
|
||||
cp -rf $dd/cfg/gh-actions.yml $dd/.github/workflows/release.yml
|
||||
|
||||
2058
scpt/mkarchiso
Executable file
2058
scpt/mkarchiso
Executable file
File diff suppressed because it is too large
Load Diff
24
scpt/sed.zsh
Executable file
24
scpt/sed.zsh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/zsh
|
||||
|
||||
d=${0:a:h}
|
||||
cd $d
|
||||
|
||||
t=`grep -Rs archlinux .|grep -v t.zsh|grep -v http|grep -v systemd|grep -v pacman`
|
||||
n=`echo $t|wc -l`
|
||||
for ((i=1;i<=$n;i++))
|
||||
do
|
||||
tt=`echo $t|awk "NR==$i"`
|
||||
echo $tt
|
||||
f=`echo $tt|cut -d : -f 1`
|
||||
echo sed -i s/archlinux/aios/g $f
|
||||
done
|
||||
|
||||
t=`grep -Rs "Arch Linux" .|grep -v t.zsh|grep -v http|grep -v systemd|grep -v pacman`
|
||||
n=`echo $t|wc -l`
|
||||
for ((i=1;i<=$n;i++))
|
||||
do
|
||||
tt=`echo $t|awk "NR==$i"`
|
||||
echo $tt
|
||||
f=`echo $tt|cut -d : -f 1`
|
||||
echo sed -i "s/Arch\ Linux/aios/g" $f
|
||||
done
|
||||
Reference in New Issue
Block a user