completed config migrarition to ~/.libburnia-releng/; advance print_size almost there

This commit is contained in:
George Danchev 2011-06-29 17:21:04 +00:00
parent 512c429cb6
commit bc0a02e39a
3 changed files with 76 additions and 15 deletions

View File

@ -1,5 +1,5 @@
# *** Set your paths, see below # *** Set your paths, see below
# *** Expected location is $HOME/releng_build_isojigdo.conf # *** Expected location is $HOME/.libburnia-releng/releng_build_isojigdo.conf
# *** Then a run of 'releng_build_isojigdo -rc' will pick it up # *** Then a run of 'releng_build_isojigdo -rc' will pick it up
# xorriso executable to be tested # xorriso executable to be tested

View File

@ -5,7 +5,7 @@ set -e
START_DIR_DONT_CHANGE=`pwd` START_DIR_DONT_CHANGE=`pwd`
SELF=$(basename "$0") SELF=$(basename "$0")
# required config items # required config items
RELENG_XORRISO=/usr/bin/xorriso RELENG_XORRISO=""
RELENG_GENISOIMAGE=/usr/bin/genisoimage RELENG_GENISOIMAGE=/usr/bin/genisoimage
RELENG_MKISOFS=/usr/bin/mkisofs RELENG_MKISOFS=/usr/bin/mkisofs
@ -13,7 +13,7 @@ RELENG_MKISOFS=/usr/bin/mkisofs
CONFFILE=${HOME}/.libburnia-releng/${SELF}.conf CONFFILE=${HOME}/.libburnia-releng/${SELF}.conf
GEN_DATA_DIR=releng_generated_data/${SELF} GEN_DATA_DIR=releng_generated_data/${SELF}
UPPER=4 UPPER=32
KEEP=0 KEEP=0
##################################################################### #####################################################################
@ -26,7 +26,7 @@ Usage:
$0 -rc [-keep] $0 -rc [-keep]
# without using a config file # without using a config file
$0 your_own_options_here $0 TODO: not ready yet
# cleanup test generated data directory and exit # cleanup test generated data directory and exit
$0 -cleanup $0 -cleanup
@ -34,16 +34,70 @@ HLP
} }
##################################################################### #####################################################################
print_help # cleanup
#if [ ! -x "${XOR}" ]; then if [ "${1}" == "-cleanup" ]; then
# printf "$0: Not found or not an executable: $XOR\n" cd "${START_DIR_DONT_CHANGE}" || exit 80
# exit 50 if [ -d "${GEN_DATA_DIR}" ]; then
#fi rm -rf ${GEN_DATA_DIR}
printf "${SELF}: removed %s\n" ${GEN_DATA_DIR}
else
printf "${SELF}: ${GEN_DATA_DIR} does not exist.\n"
fi
exit 0
fi
# help
if [ ! "${1}" ]; then print_help && exit 10; fi
# config file
if [ "${1}" == "-rc" ]; then
if [ -e ${CONFFILE} ]; then
. ${CONFFILE}
printf "${SELF}: Using config file %s\n" ${CONFFILE}
else
echo -e "\n${SELF}: Config file ${CONFFILE} not found.\n" && exit 20
fi
if [ "${2}" == "-keep" ]; then KEEP=1; fi
# command line args
elif [ "${2}" ]; then
RELENG_XORRISO="${2}"
if [ "${3}" == "-keep" ]; then KEEP=1; fi
# the rest
else
print_help && exit 30
fi
# data dir
if [ -d "${GEN_DATA_DIR}" ]; then
printf "\n${SELF}: directory %s exists!" ${GEN_DATA_DIR}
printf "\n${SELF}: use '${SELF} -cleanup' to remove.\n"
exit 2
else
mkdir "${GEN_DATA_DIR}"
fi
if [ "${RELENG_XORRISO}" == "" ]; then
echo -e "\n${SELF}: xorriso_cmd is required\n"
exit 40
fi
if [ ! -x "${RELENG_XORRISO}" ]; then
printf "${SELF}: Not found or not an executable: $RELENG_XORRISO\n"
exit 50
fi
# all must be set at this point
printf "${SELF}: Config items:"
printf "\n\txorriso_cmd=${RELENG_XORRISO}\n"
# xorriso version details, incl. underlying libraries # xorriso version details, incl. underlying libraries
# "${XOR}" -version "${RELENG_XORRISO}" -version
if ! "${RELENG_XORRISO}" -version | grep libjte >/dev/null 2>&1; then
printf "\n${SELF}: JTE not supported with this xorriso build. Install jigit and rebuild."
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
exit 51
fi
################################################
printf "${SELF}: Generating sample tree\n" printf "${SELF}: Generating sample tree\n"
for ((i1=0; i1 < ${UPPER}/4; i1++)) for ((i1=0; i1 < ${UPPER}/4; i1++))
do do
@ -73,10 +127,11 @@ if [ -x ${RELENG_MKISOFS} ]; then
time ${RELENG_MKISOFS} -quiet -print-size ${GEN_DATA_DIR} time ${RELENG_MKISOFS} -quiet -print-size ${GEN_DATA_DIR}
fi fi
cd ${START_DIR_DONT_CHANGE} || exit 2 if [ ${KEEP} -eq 0 ]; then
cd ${START_DIR_DONT_CHANGE} || exit 2
rm -rf ${GEN_DATA_DIR} rm -rf ${GEN_DATA_DIR}
fi
printf "\n${SELF}: FAIL: SCRIPT NOT COMPLETED YET\n" printf "\n${SELF}: FAIL: SCRIPT NOT COMPLETED YET\n"
exit 31 exit 31
exit 0

View File

@ -0,0 +1,6 @@
# *** Set your paths, see below
# *** Expected location is $HOME/.libburnia-releng/releng_print_size.conf
# *** Then a run of 'releng_print_size -rc' will pick it up
# xorriso executable to be tested
RELENG_XORRISO=/path/to/xorriso