From b0377cc659402cc22f2bac07bd8dc51ec6554194 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 24 Aug 2022 15:49:11 +0000 Subject: [PATCH] add error handling to migration script --- build/scripts/migration/script.d/03-migrate-casaos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/scripts/migration/script.d/03-migrate-casaos.sh b/build/scripts/migration/script.d/03-migrate-casaos.sh index 08a2506..7038164 100644 --- a/build/scripts/migration/script.d/03-migrate-casaos.sh +++ b/build/scripts/migration/script.d/03-migrate-casaos.sh @@ -143,7 +143,7 @@ pushd "${MIGRATION_SERVICE_DIR}" for VER2 in "${MIGRATION_PATH[@]}"; do MIGRATION_TOOL_FILE=linux-"${ARCH}"-"${APP_NAME}"-migration-tool-"${VER2}".tar.gz __info "Extracting ${MIGRATION_TOOL_FILE}..." - tar zxvf "${MIGRATION_TOOL_FILE}" + tar zxvf "${MIGRATION_TOOL_FILE}" || __error "Failed to extract ${MIGRATION_TOOL_FILE}" MIGRATION_SYSROOT_DIR=$(realpath -e "${MIGRATION_SERVICE_DIR}"/build/sysroot || __error "Failed to find sysroot directory for migration") cp -rv "${MIGRATION_SYSROOT_DIR}"/* / || __error "Failed to copy sysroot directory for migration"