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

28 lines
557 B
Bash
Executable File

#!/bin/sh
set -ef
. /image-entry.d/00-common.envsh
[ -d "${merged_root}" ] || install -d "${merged_root}"
for n in ${NGX_DIRS_MERGE} ; do
[ -n "$n" ] || continue
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