diff mbox series

[isar-cip-core,2/3,v2] deploy-cip-core.sh: Deploy only the .wic image if it is present

Message ID 20230908124237.508469-3-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core,1/3,v2] Kconfig: Opt additional IEC 62443-4-2 features when security option is selected | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com Sept. 8, 2023, 12:42 p.m. UTC
From: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>

Deploy seperate artifacts like tar.gz, kernel and initrd image only
if .wic image is not present.

Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
---
 scripts/deploy-cip-core.sh | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
index eaa8974..5855acb 100755
--- a/scripts/deploy-cip-core.sh
+++ b/scripts/deploy-cip-core.sh
@@ -34,22 +34,22 @@  if [ -f "${BASE_PATH}.wic" ]; then
 
 	echo "Uploading artifacts..."
 	aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
-fi
-
-if [ -f "${BASE_PATH}.tar.gz" ]; then
-	echo "Uploading artifacts..."
-	aws s3 cp --no-progress --acl public-read "${BASE_PATH}.tar.gz" "${S3_TARGET}"
-fi
+else
+	if [ -f "${BASE_PATH}.tar.gz" ]; then
+		echo "Uploading artifacts..."
+		aws s3 cp --no-progress --acl public-read "${BASE_PATH}.tar.gz" "${S3_TARGET}"
+	fi
 
-KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
-# iwg20m workaround
-if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
-	KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
-fi
-# shellcheck disable=SC2086
-aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
-aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
+	KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
+	# iwg20m workaround
+	if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
+		KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
+	fi
+	# shellcheck disable=SC2086
+	aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
+	aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
 
-if [ "$DTB" != "none" ]; then
-	aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
+	if [ "$DTB" != "none" ]; then
+		aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
+	fi
 fi