move self-generated files to GEN_DATA_DIR, except and pre-existing image and its extracted tree

This commit is contained in:
George Danchev 2011-07-03 08:57:30 +00:00
parent 2135ec2704
commit 2e4eef6811

View File

@ -119,7 +119,7 @@ if [ ! -f "${TMP_DATA_DIR}"/"${REMOTE_IMG}" ]; then
;;
esac
else
printf "\n${SELF}: Found image: ${GEN_DATA_DIR}/${REMOTE_IMG}\n"
printf "\n${SELF}: Found image: ${TMP_DATA_DIR}/${REMOTE_IMG}\n"
fi
# check for extraction directory existence
@ -134,11 +134,11 @@ set +e
set -e
# 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}"
# 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
# GENERAL section
@ -153,7 +153,7 @@ CMD="${RELENG_XORRISO} \
"
# 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+="\
-b ${RELENG_ISOLINUX_BIN} \
-c ${RELENG_BOOT_CAT} \
@ -164,16 +164,17 @@ CMD+="\
"
else
printf "\n${SELF}: FAIL to compose the boot section.\n"
exit 10
fi
# JIGDO section
JIGDO_JIGDO=${TMP_DATA_DIR}/${RELENG_IMG}.jigdo
JIGDO_TEMPLATE=${TMP_DATA_DIR}/${RELENG_IMG}.template
JIGDO_JIGDO=${GEN_DATA_DIR}/${RELENG_IMG}.jigdo
JIGDO_TEMPLATE=${GEN_DATA_DIR}/${RELENG_IMG}.template
JIGDO_MAP_RHV=`realpath ${RELENG_DIR}`
JIGDO_MAP="Debian=${JIGDO_MAP_RHV}"
# 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
printf "${SELF}: Creating MD5 list in hex format in ${JIGDO_GEN_MD5}\n"
jigdo-gen-md5-list ${RELENG_DIR} > ${JIGDO_GEN_MD5}