rename file to remove the "-sda" suffix

This commit is contained in:
Pratham Patel 2023-07-27 20:45:47 +05:30
parent f355fead8a
commit e128db8d4a
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -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