add a template script to start with - template_new_releng

This commit is contained in:
George Danchev 2011-06-26 23:44:51 +00:00
parent 3eb88a0126
commit 0491518c13
3 changed files with 44 additions and 15 deletions

View File

@ -12,6 +12,7 @@ Release Engineering Che[at|ck] List
+ Read the configuration files and set up accordingly
* DELIVERING A NEW TEST SCRIPT
+ start a new test over the top of template_new_releng
+ file name starts with releng_
+ mandatory options -rc [-clean]
+ well documented configuration file test.conf{.template}

View File

@ -14,25 +14,22 @@ BOOT_CAT=""
CONFFILE=$HOME/releng_build_isojigdo.conf
CLEAN=0
RES=""
print_help() {
cat << HLP
Usage:
$0 -help
# using a config file ${CONFFILE}
$0 -rc [-clean]
config file content:
XOR=/path/to/xorriso
DIR=/path/to/input_dir
IMG=/path/to/out_image
ISOLINUX_BIN=/path/to/isolinux.bin
BOOT_CAT=/path/to/boot.cat
# without using a config file
$0 xorriso_cmd IN_dir OUT_image [IN_isolinux] [OUT_bootcat] [-clean]
HLP
}
#####################################################################
# help
if [ ! "${1}" -o "${1}" == "-help" ]; then print_help && exit 10; fi
if [ ! "${1}" ]; then print_help && exit 10; fi
# config file
if [ "${1}" == "-rc" ]; then
if [ -e ${CONFFILE} ]; then
@ -72,9 +69,8 @@ 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\tOUT_bootcat=${BOOT_CAT}\n"
RES="${IMG}.iso ${IMG}.new ${IMG}.md5 ${IMG}.jigdo ${IMG}.template"
############################################################
main() {
# version details, incl. underlying libraries
# xorriso version details, incl. underlying libraries
"${XOR}" -version
if ! "${XOR}" -version | grep libjte >/dev/null 2>&1; then
printf "\n$0: JTE not supported with this xorriso build. Install jigit and rebuild."
@ -188,8 +184,3 @@ printf " * xorriso -indev ${IMG}.iso -pvd_info\n"
printf " * fdisk -lu ${IMG}.iso\n"
exit 0
}
#
main

View File

@ -0,0 +1,37 @@
#!/bin/bash
set -e
START_DIR_DONT_CHANGE=`pwd`
# required config items
# XOR=""
# optional config items
# config file
CONFFILE=$HOME/TODO.conf
CLEAN=0
#####################################################################
print_help() {
cat << HLP
Usage:
$0 -help
# using a config file ${CONFFILE}
$0 -rc [-clean]
# without using a config file
$0
HLP
}
#####################################################################
#if [ ! -x "${XOR}" ]; then
# printf "$0: Not found or not an executable: $XOR\n"
# exit 50
#fi
# xorriso version details, incl. underlying libraries
# "${XOR}" -version
exit 0