more clear formatting, drop commented cruft
This commit is contained in:
parent
d4fbeae2a6
commit
a526041df6
@ -22,89 +22,9 @@ else
|
|||||||
mkdir "${GEN_DATA_DIR}"
|
mkdir "${GEN_DATA_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#START_DIR_DONT_CHANGE=`pwd`
|
|
||||||
#SELF=$(basename "$0")
|
|
||||||
# required config items
|
|
||||||
#RELENG_XORRISO=""
|
|
||||||
|
|
||||||
RELENG_GENISOIMAGE=/usr/bin/genisoimage
|
RELENG_GENISOIMAGE=/usr/bin/genisoimage
|
||||||
RELENG_MKISOFS=/usr/bin/mkisofs
|
RELENG_MKISOFS=/usr/bin/mkisofs
|
||||||
|
|
||||||
# config file
|
|
||||||
# CONFFILE=${HOME}/.libburnia-releng/${SELF}.conf
|
|
||||||
# GEN_DATA_DIR=releng_generated_data/${SELF}
|
|
||||||
|
|
||||||
UPPER=40
|
UPPER=40
|
||||||
# KEEP=0
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
#print_help() {
|
|
||||||
# cat << HLP
|
|
||||||
#Usage:
|
|
||||||
# $0 -help
|
|
||||||
|
|
||||||
# using a config file ${CONFFILE}
|
|
||||||
# $0 -rc [-keep]
|
|
||||||
|
|
||||||
# without using a config file
|
|
||||||
# $0 xorriso_cmd
|
|
||||||
|
|
||||||
# cleanup test generated data directory and exit
|
|
||||||
# $0 -cleanup
|
|
||||||
#HLP
|
|
||||||
#}
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
# cleanup
|
|
||||||
#if [ "${1}" == "-cleanup" ]; then
|
|
||||||
# cd "${START_DIR_DONT_CHANGE}" || exit 2
|
|
||||||
# if [ -d "${GEN_DATA_DIR}" ]; then
|
|
||||||
# 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 3; 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 4
|
|
||||||
# fi
|
|
||||||
# if [ "${2}" == "-keep" ]; then KEEP=1; fi
|
|
||||||
# command line args
|
|
||||||
#elif [ "${1}" ]; then
|
|
||||||
# RELENG_XORRISO="${1}"
|
|
||||||
# if [ "${2}" == "-keep" ]; then KEEP=1; fi
|
|
||||||
# the rest
|
|
||||||
#else
|
|
||||||
# print_help && exit 5
|
|
||||||
#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 6
|
|
||||||
#else
|
|
||||||
# mkdir "${GEN_DATA_DIR}"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
#if [ "${RELENG_XORRISO}" == "" ]; then
|
|
||||||
# echo -e "\n${SELF}: xorriso_cmd is required\n"
|
|
||||||
# exit 7
|
|
||||||
# fi
|
|
||||||
|
|
||||||
#if [ ! -x "${RELENG_XORRISO}" ]; then
|
|
||||||
# printf "${SELF}: Not found or not an executable: $RELENG_XORRISO\n"
|
|
||||||
# exit 8
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# All must be set at this point
|
# All must be set at this point
|
||||||
printf "${SELF}: Config items:"
|
printf "${SELF}: Config items:"
|
||||||
@ -149,9 +69,8 @@ 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
|
||||||
|
|
||||||
if [ ${KEEP} -eq 0 ]; then
|
#
|
||||||
cd ${START_DIR_DONT_CHANGE} || exit 10
|
cleanup
|
||||||
rm -rf ${GEN_DATA_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
#
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user