xorriso -quiet, spew config items instead

This commit is contained in:
George Danchev 2011-06-23 14:48:36 +00:00
parent 8c073d4159
commit 21f279d70e

View File

@ -33,8 +33,11 @@ HLP
if [ ! "${1}" -o "${1}" == "-help" ]; then print_help && exit 0; fi
# config file
if [ "${1}" == "-rc" ]; then
if [ -e ${CONFFILE} ]; then . ${CONFFILE}
else echo -e "$0: Config file ${CONFFILE} not found.\n" && exit 1
if [ -e ${CONFFILE} ]; then
. ${CONFFILE}
printf "$0: Using config file %s\n" ${CONFFILE}
else
echo -e "\n$0: Config file ${CONFFILE} not found.\n" && exit 1
fi
if [ "${2}" == "-clean" ]; then CLEAN=1; fi
# command line args
@ -52,8 +55,16 @@ else
print_help && exit 0
fi
RES="${IMG}.iso ${IMG}.new ${IMG}.md5 ${IMG}.jigdo ${IMG}.template"
if [ "${XOR}" == "" -o "${DIR}" == "" -o "${IMG}" == "" ]; then
echo -e "\n$0: xorriso_cmd IN_dir and OUT_image are required\n"
exit 1
fi
# all must be set at this point
printf "$0: Config items:"
printf "\n\txorriso_cmd=${XOR}\n\tIN_dir=${DIR}\n\tOUT_image=${IMG}.iso"
printf "\n\tIN_isolinux=${ISOLINUX_BIN}\n\tIN_bootcat=${BOOT_CAT}\n"
RES="${IMG}.iso ${IMG}.new ${IMG}.md5 ${IMG}.jigdo ${IMG}.template"
############################################################
main() {
# remove cruft from previous runs
@ -71,13 +82,14 @@ if which jigdo-gen-md5-list >/dev/null 2>&1; then
jigdo-gen-md5-list ${DIR} > ${IMG}.md5
printf "Done.\n"
else
printf "$0: Not found: jigdo-gen-md5-list. Install jigit.\n"
printf "\n$0: Not found: jigdo-gen-md5-list. Install jigit.\n"
exit 1
fi
# build the command - general section
CMD="${XOR} \
-as mkisofs \
-quiet \
-o ${IMG}.iso \
-R \
-V ISOJIGDO \
@ -126,16 +138,16 @@ diff ${IMG}.iso ${IMG}.new
# sort out the cruft
if [ ${CLEAN} -eq 1 ]; then
rm -f ${RES}
printf "removed: %s\n" ${RES}
printf "$0: removed %s\n" ${RES}
else
printf "left: %s\n" ${RES}
printf "$0: left %s\n" ${RES}
fi
# last hints
printf "$0: Checks remained to be done:\n"
printf " * resulting ISO image ${IMG} boots USB stick and/or Optical media.\n"
printf "\n$0: HINT: manual checks remained to be done:\n"
printf " * ${IMG}.img boots from USB stick and/or optical media.\n"
printf " * appended FAT partition is mountable.\n"
printf " * fdisk -lu ${IMG}\n"
printf " * fdisk -lu ${IMG}.iso\n"
}