From 0491518c130eb76211e45b4b5b64094682e219b7 Mon Sep 17 00:00:00 2001 From: George Danchev Date: Sun, 26 Jun 2011 23:44:51 +0000 Subject: [PATCH] add a template script to start with - template_new_releng --- libisoburn/trunk/releng/README.releng | 1 + libisoburn/trunk/releng/releng_build_isojigdo | 21 +++-------- libisoburn/trunk/releng/template_new_releng | 37 +++++++++++++++++++ 3 files changed, 44 insertions(+), 15 deletions(-) create mode 100755 libisoburn/trunk/releng/template_new_releng diff --git a/libisoburn/trunk/releng/README.releng b/libisoburn/trunk/releng/README.releng index 81a6c46e..74ff4484 100644 --- a/libisoburn/trunk/releng/README.releng +++ b/libisoburn/trunk/releng/README.releng @@ -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} diff --git a/libisoburn/trunk/releng/releng_build_isojigdo b/libisoburn/trunk/releng/releng_build_isojigdo index dd33a328..4bd0503f 100755 --- a/libisoburn/trunk/releng/releng_build_isojigdo +++ b/libisoburn/trunk/releng/releng_build_isojigdo @@ -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 diff --git a/libisoburn/trunk/releng/template_new_releng b/libisoburn/trunk/releng/template_new_releng new file mode 100755 index 00000000..d9e5d11b --- /dev/null +++ b/libisoburn/trunk/releng/template_new_releng @@ -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