Manage error on unzip archive
This commit is contained in:
parent
8853575109
commit
8e7e68c373
|
@ -184,11 +184,12 @@ Create ${CZ_INSTALLER_DIR} tree."
|
||||||
&& error_message "${CZ_TEMP_FILE} is empty." 3
|
&& error_message "${CZ_TEMP_FILE} is empty." 3
|
||||||
debug_message "FOR loop − ${ARCH} − \
|
debug_message "FOR loop − ${ARCH} − \
|
||||||
Uncompress PXE files from ${CZ_TEMP_FILE} ."
|
Uncompress PXE files from ${CZ_TEMP_FILE} ."
|
||||||
unzip -qq -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d .
|
unzip -qq -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d . \
|
||||||
|
|| error_message "Can't properly extract ${CZ_TEMP_FILE} archive."
|
||||||
### }}}
|
### }}}
|
||||||
|
|
||||||
### Remove temp file
|
### Remove temp file
|
||||||
rm --recursive --force -- "${CZ_TEMP_FILE}" \
|
rm --force -- "${CZ_TEMP_FILE}" \
|
||||||
|| error_message "Can't remove ${CZ_TEMP_FILE} temp file."
|
|| error_message "Can't remove ${CZ_TEMP_FILE} temp file."
|
||||||
|
|
||||||
### Add flag file to know that this version is available
|
### Add flag file to know that this version is available
|
||||||
|
|
|
@ -240,7 +240,8 @@ EOF
|
||||||
download_file "${GPARTED_URL}" "${GPARTED_TEMP_FILE}"
|
download_file "${GPARTED_URL}" "${GPARTED_TEMP_FILE}"
|
||||||
is_file_empty "${GPARTED_TEMP_FILE}" \
|
is_file_empty "${GPARTED_TEMP_FILE}" \
|
||||||
&& error_message "${GPARTED_TEMP_FILE} is empty." 3
|
&& error_message "${GPARTED_TEMP_FILE} is empty." 3
|
||||||
unzip -qq -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d .
|
unzip -qq -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d . \
|
||||||
|
|| error_message "Can't properly extract ${GPARTED_TEMP_FILE} archive."
|
||||||
|
|
||||||
rm --force -- "${GPARTED_TEMP_FILE}"
|
rm --force -- "${GPARTED_TEMP_FILE}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue