mv old
This commit is contained in:
71
old/scpt/gh-actions.zsh
Executable file
71
old/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
|
||||
|
||||
9
old/scpt/img.sh
Normal file
9
old/scpt/img.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
pacman -Syuu --noconfirm git base-devel archiso
|
||||
git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
|
||||
mkdir -p work/x86_64/airootfs/var/lib/machines/arch
|
||||
pacstrap -c work/x86_64/airootfs/var/lib/machines/arch base
|
||||
arch-chroot work/x86_64/airootfs/ /bin/sh -c 'pacman-key --init'
|
||||
arch-chroot work/x86_64/airootfs/ /bin/sh -c 'pacman-key --populate archlinux'
|
||||
tar -zcvf archlinux.tar.gz -C work/x86_64/airootfs/ .
|
||||
2060
old/scpt/mkarchiso
Executable file
2060
old/scpt/mkarchiso
Executable file
File diff suppressed because it is too large
Load Diff
24
old/scpt/sed.zsh
Executable file
24
old/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