1
0
angie-conv-image/image-entry.d/62-merge-tree.sh

28 lines
557 B
Bash
Raw Normal View History

2024-07-11 13:37:35 +03:00
#!/bin/sh
set -ef
. /image-entry.d/00-common.envsh
[ -d "${merged_root}" ] || install -d "${merged_root}"
2024-07-20 16:35:39 +03:00
for n in ${NGX_DIRS_MERGE} ; do
[ -n "$n" ] || continue
2024-07-11 13:37:35 +03:00
merged_dir="${merged_root}/$n"
while read -r old_path ; do
[ -n "${old_path}" ] || continue
new_path=$(remap_path "${old_path}" "${merged_dir}")
[ -n "${new_path}" ]
new_dir="${new_path%/*}"
[ -d "${new_dir}" ] || mkdir -p "${new_dir}"
ln_s "${old_path}" "${new_path}"
done <<-EOF
$(overlay-dir-list.sh "/etc/angie/$n.dist" "/etc/angie/$n" "/angie/$n")
EOF
done
exit 0