From 100f898d806d4a354c828a0951647c6d61c9039e Mon Sep 17 00:00:00 2001 From: George Danchev Date: Thu, 23 Jun 2011 11:01:39 +0000 Subject: [PATCH] check for config file and jigdo-gen-md5-list existance --- releng/releng_build_jigdo | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/releng/releng_build_jigdo b/releng/releng_build_jigdo index dcf67b11..24a33afc 100755 --- a/releng/releng_build_jigdo +++ b/releng/releng_build_jigdo @@ -9,7 +9,7 @@ IMG="" # optional ISOLINUX_BIN="" BOOT_CAT="" -CONFFILE=$HOME/releng_build_jigdo.conf +CONFFILE=$HOME/releng_build_isojigdo.conf CLEAN=0 print_help() { @@ -34,7 +34,7 @@ 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: can not find config file: ${CONFFILE}\n" + else echo -e "$0: Config file ${CONFFILE} not found.\n" && exit 1 fi if [ "${2}" == "-clean" ]; then CLEAN=1; fi # command line args @@ -66,7 +66,14 @@ main() { # /sbin/mkfs.msdos -n Bla -C fatpart.fat 8192 # create MD5 list in base64 format -jigdo-gen-md5-list ${DIR} > ${IMG}.md5 +if which jigdo-gen-md5-list >/dev/null 2>&1; then + printf "$0: Creating MD5 list in hex format..." + jigdo-gen-md5-list ${DIR} > ${IMG}.md5 + printf "Done.\n" +else + printf "$0: Not found: jigdo-gen-md5-list. Install jigit.\n" + exit 1 +fi # build the command - general section CMD="${XOR} \ @@ -103,7 +110,7 @@ CMD+="\ CMD+="${DIR}" # run it -echo -e "$0: creating iso & jigdo representations:\n$CMD\n" +echo -e "$0: Creating ISO and jigdo representations:\n$CMD\n" ${CMD} # create another one from jigdo files