Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kb7vDj6PHwymeDeSUUk1eX
22 lines
501 B
Bash
Executable File
22 lines
501 B
Bash
Executable File
#!/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
|