check for config file and jigdo-gen-md5-list existance
This commit is contained in:
parent
d7cd3be2df
commit
c8eafc252f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user