Add manual catalog management
This commit is contained in:
@@ -29,6 +29,24 @@ sync_missing_dir_entries() {
|
||||
done
|
||||
}
|
||||
|
||||
migrate_legacy_manual_catalog() {
|
||||
legacy_dir="$DATA_ROOT/workspace/brands/local"
|
||||
target_dir="$DATA_ROOT/workspace/local"
|
||||
legacy_file="$legacy_dir/manual_catalog.json"
|
||||
target_file="$target_dir/manual_catalog.json"
|
||||
|
||||
[ -d "$legacy_dir" ] || return
|
||||
|
||||
mkdir -p "$target_dir"
|
||||
if [ -f "$legacy_file" ] && [ ! -f "$target_file" ]; then
|
||||
cp -a "$legacy_file" "$target_file"
|
||||
fi
|
||||
|
||||
# Older builds accidentally copied local overlay files under brands/local.
|
||||
# Once the real target exists, drop the misplaced directory to avoid confusion.
|
||||
rm -rf "$legacy_dir"
|
||||
}
|
||||
|
||||
init_path() {
|
||||
rel_path="$1"
|
||||
src_path="$APP_ROOT/$rel_path"
|
||||
@@ -82,3 +100,5 @@ for rel_path in \
|
||||
do
|
||||
init_path "$rel_path"
|
||||
done
|
||||
|
||||
migrate_legacy_manual_catalog
|
||||
|
||||
Reference in New Issue
Block a user