From 35d02563e7ade37feed6ec2b354f404aab2748b2 Mon Sep 17 00:00:00 2001 From: Davlet Panech Date: Tue, 6 Sep 2022 14:44:37 -0400 Subject: [PATCH] Publish "export" dir at destination's top level Before this patch the "export" dir was published at PUBLISH_DIR/export. This adds an unnecessary sub-directory under PUBLISH_DIR. Publish it directly in PUBLISH_DIR instead. Signed-off-by: Davlet Panech Change-Id: Ibcbb02e7590d5fbc847bb2cc4d00b69096dbeab1 --- scripts/publish-export-dir.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/publish-export-dir.sh b/scripts/publish-export-dir.sh index 1136985..9b23852 100755 --- a/scripts/publish-export-dir.sh +++ b/scripts/publish-export-dir.sh @@ -14,11 +14,11 @@ load_build_env $DRY_RUN && bail "DRY_RUN not supported, bailing out" || : src_dir="$WORKSPACE_ROOT/export" -dst_dir="$PUBLISH_DIR/export" +dst_dir="$PUBLISH_DIR" -rm -rfv --one-file-system "$dst_dir" ! dir_is_empty "$src_dir" || exit 0 notice "copying export dir $dst_dir" -cp -avr "$src_dir" "$dst_dir" +mkdir -p "$dst_dir" +find "$src_dir" -mindepth 1 -maxdepth 1 -exec cp -vr --dereference -t "$dst_dir" '{}' '+'