refactor: use bubble instead

This commit is contained in:
iceBear67
2026-06-15 17:22:01 +08:00
parent ab9b4c7e13
commit 37d68dfcab
9 changed files with 47 additions and 381 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/sh
# VARIABLES: _REVISION_ _REPO_
set -euo pipefail
mkdir -p /users && chown keeper /users && chmod 644 /users
su keeper
init_repo(){
git clone -b _REVISION_ _REPO_ /users
}
if [[ ! -d /users/.git ]]; then
init_repo
elif [[ -d /users && cd /users && ! git pull origin _REVISION_ ]]; then
init_repo
fi

View File

@@ -1,16 +0,0 @@
#!/bin/sh
mkdir -p /app
cd /app
rm -rf ./template ./snapshot
mkdir /app/template /app/snapshot
set -euo pipefail
git clone -b _REVISION_ _REPO_ template
python3 /daemon/orchestrate.py \
--root /app/template \
--network cloud \
--volume-parent /data/volumes \
--snapshot-root /app/snapshot