build a compound xorriso cmdline, on demand

This commit is contained in:
George Danchev 2011-06-22 20:20:00 +00:00
parent 0818711176
commit b62a9f269e
1 changed files with 37 additions and 17 deletions

View File

@ -15,32 +15,52 @@ RES="${IMG}.iso ${IMG}.new ${IMG}.md5 ${IMG}.jigdo ${IMG}.template"
# remove cruft from previous runs # remove cruft from previous runs
# rm -f ${RES} # rm -f ${RES}
# create FAT partition
# /sbin/mkfs.msdos -n Bla -C test.fat 8192
# create MD5 list in base64 format
jigdo-gen-md5-list ${DIR} > ${IMG}.md5 jigdo-gen-md5-list ${DIR} > ${IMG}.md5
${XOR} \ # build the command - general section
-as mkisofs \ CMD="${XOR} \
-o ${IMG}.iso \ -as mkisofs \
-R -V 'ISO_JIGDO' \ -o ${IMG}.iso \
-partition_offset 16 \ -R \
-J -joliet-long \ -V ISOJIGDO \
\ -partition_offset 16 \
-jigdo-template-compress gzip \ -J -joliet-long \
-checksum_algorithm_iso md5,sha1,sha256,sha512 \ "
-checksum_algorithm_template md5,sha1,sha256,sha512 \ # boot section
-jigdo-jigdo ${IMG}.jigdo \ #if [ "${4}" ]; then
-jigdo-template ${IMG}.template \ #CMD+=
-jigdo-map Debian=${DIR} \ #fi
-md5-list ${IMG}.md5 \
-jigdo-min-file-size 1024 \
\
${DIR}
# jigdo section
CMD+="\
-jigdo-template-compress gzip \
-checksum_algorithm_iso md5,sha1,sha256,sha512 \
-checksum_algorithm_template md5,sha1,sha256,sha512 \
-jigdo-jigdo ${IMG}.jigdo \
-jigdo-template ${IMG}.template \
-jigdo-map Debian=${DIR} \
-md5-list ${IMG}.md5 \
-jigdo-min-file-size 1024 \
"
CMD+="${DIR}"
# run it
echo -e "$0: creating iso & jigdo representations:\n$CMD\n"
${CMD}
# create another one from jigdo files
jigit-mkimage \ jigit-mkimage \
-t ${IMG}.template \ -t ${IMG}.template \
-j ${IMG}.jigdo \ -j ${IMG}.jigdo \
-m Debian=${DIR} \ -m Debian=${DIR} \
-o ${IMG}.new -o ${IMG}.new
# diff'em
diff ${IMG}.iso ${IMG}.new diff ${IMG}.iso ${IMG}.new
# sort out the cruft # sort out the cruft