From e128db8d4aef2168d6760612d4270dd3d32661d9 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Thu, 27 Jul 2023 20:45:47 +0530 Subject: [PATCH] rename file to remove the "-sda" suffix --- create-image.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/create-image.sh b/create-image.sh index 7500096..6ae54a3 100755 --- a/create-image.sh +++ b/create-image.sh @@ -22,6 +22,7 @@ appliance-creator \ 1> Rocky-9-aarch64-minimal.stdout.log \ 2> Rocky-9-aarch64-minimal.stderr.log -if [[ -f "${APPLIANCE_NAME}*" ]]; then - chown "${REAL_USER}:${REAL_USER}" "${APPLIANCE_NAME}*" +if [[ -f "${APPLIANCE_NAME}-sda.raw" ]]; then + mv "${APPLIANCE_NAME}-sda.raw" "${APPLIANCE_NAME}.raw" + chown -v "${REAL_USER}:${REAL_USER}" "${APPLIANCE_NAME}*" fi