move self-generated files to GEN_DATA_DIR, except and pre-existing image and its extracted tree
This commit is contained in:
parent
14b32afd54
commit
3c3e485ec9
@ -119,7 +119,7 @@ if [ ! -f "${TMP_DATA_DIR}"/"${REMOTE_IMG}" ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
printf "\n${SELF}: Found image: ${GEN_DATA_DIR}/${REMOTE_IMG}\n"
|
printf "\n${SELF}: Found image: ${TMP_DATA_DIR}/${REMOTE_IMG}\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check for extraction directory existence
|
# check for extraction directory existence
|
||||||
@ -134,11 +134,11 @@ set +e
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# grab an MBR
|
# grab an MBR
|
||||||
ISOHYBRID_MBR="${TMP_DATA_DIR}/isohybrid.mbr"
|
ISOHYBRID_MBR="${GEN_DATA_DIR}/isohybrid.mbr"
|
||||||
dd if="${TMP_DATA_DIR}/${REMOTE_IMG}" bs=1K count=32 of="${ISOHYBRID_MBR}"
|
dd if="${TMP_DATA_DIR}/${REMOTE_IMG}" bs=1K count=32 of="${ISOHYBRID_MBR}"
|
||||||
|
|
||||||
# create FAT partition
|
# create FAT partition
|
||||||
APPEND_PART="${TMP_DATA_DIR}/fatpart.fat"
|
APPEND_PART="${GEN_DATA_DIR}/fatpart.fat"
|
||||||
/sbin/mkfs.msdos -n Bla -C "${APPEND_PART}" 8192
|
/sbin/mkfs.msdos -n Bla -C "${APPEND_PART}" 8192
|
||||||
|
|
||||||
# GENERAL section
|
# GENERAL section
|
||||||
@ -153,7 +153,7 @@ CMD="${RELENG_XORRISO} \
|
|||||||
"
|
"
|
||||||
|
|
||||||
# BOOT section
|
# BOOT section
|
||||||
if [ -f "${TMP_DATA_DIR}"/"${RELENG_ISOLINUX_BIN}" -a -f "${ISOHYBRID_MBR}" -a -f "${APPEND_PART}" ]; then
|
if [ -f "${IMG_EXTRACT_DIR}"/"${RELENG_ISOLINUX_BIN}" -a -f "${ISOHYBRID_MBR}" -a -f "${APPEND_PART}" ]; then
|
||||||
CMD+="\
|
CMD+="\
|
||||||
-b ${RELENG_ISOLINUX_BIN} \
|
-b ${RELENG_ISOLINUX_BIN} \
|
||||||
-c ${RELENG_BOOT_CAT} \
|
-c ${RELENG_BOOT_CAT} \
|
||||||
@ -164,16 +164,17 @@ CMD+="\
|
|||||||
"
|
"
|
||||||
else
|
else
|
||||||
printf "\n${SELF}: FAIL to compose the boot section.\n"
|
printf "\n${SELF}: FAIL to compose the boot section.\n"
|
||||||
|
exit 10
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# JIGDO section
|
# JIGDO section
|
||||||
JIGDO_JIGDO=${TMP_DATA_DIR}/${RELENG_IMG}.jigdo
|
JIGDO_JIGDO=${GEN_DATA_DIR}/${RELENG_IMG}.jigdo
|
||||||
JIGDO_TEMPLATE=${TMP_DATA_DIR}/${RELENG_IMG}.template
|
JIGDO_TEMPLATE=${GEN_DATA_DIR}/${RELENG_IMG}.template
|
||||||
JIGDO_MAP_RHV=`realpath ${RELENG_DIR}`
|
JIGDO_MAP_RHV=`realpath ${RELENG_DIR}`
|
||||||
JIGDO_MAP="Debian=${JIGDO_MAP_RHV}"
|
JIGDO_MAP="Debian=${JIGDO_MAP_RHV}"
|
||||||
|
|
||||||
# create jigdo MD5 list in base64 format
|
# create jigdo MD5 list in base64 format
|
||||||
JIGDO_GEN_MD5=${TMP_DATA_DIR}/${RELENG_IMG}.md5
|
JIGDO_GEN_MD5=${GEN_DATA_DIR}/${RELENG_IMG}.md5
|
||||||
if which jigdo-gen-md5-list >/dev/null 2>&1; then
|
if which jigdo-gen-md5-list >/dev/null 2>&1; then
|
||||||
printf "${SELF}: Creating MD5 list in hex format in ${JIGDO_GEN_MD5}\n"
|
printf "${SELF}: Creating MD5 list in hex format in ${JIGDO_GEN_MD5}\n"
|
||||||
jigdo-gen-md5-list ${RELENG_DIR} > ${JIGDO_GEN_MD5}
|
jigdo-gen-md5-list ${RELENG_DIR} > ${JIGDO_GEN_MD5}
|
||||||
|
Loading…
Reference in New Issue
Block a user