Run cn migrations in the update pipeline and serve package installs from omarchy cn update
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kb7vDj6PHwymeDeSUUk1eX
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# omarchy:summary=Run pending OmarchyCN migrations
|
||||
# omarchy:examples=omarchycn migrate
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
MIGRATIONS_DIR="$OMARCHY_PATH/cn/migrations"
|
||||
DONE_DIR="$HOME/.local/state/omarchycn/migrations-done"
|
||||
|
||||
[[ -d $MIGRATIONS_DIR ]] || exit 0
|
||||
|
||||
mkdir -p "$DONE_DIR"
|
||||
for m in "$MIGRATIONS_DIR"/*.sh; do
|
||||
[[ -f $m ]] || continue
|
||||
name="${m##*/}"
|
||||
if [[ ! -f $DONE_DIR/$name ]]; then
|
||||
echo "OmarchyCN migration: $name"
|
||||
bash -euo pipefail "$m"
|
||||
touch "$DONE_DIR/$name"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user