use self basename; sort numerically to get minimal determinism
This commit is contained in:
parent
43e9635bf3
commit
ed7886fe9a
@ -5,10 +5,6 @@ set -e
|
|||||||
SELF=$(basename "$0")
|
SELF=$(basename "$0")
|
||||||
CLOG1=log.$SELF.1
|
CLOG1=log.$SELF.1
|
||||||
CLOG2=log.$SELF.2
|
CLOG2=log.$SELF.2
|
||||||
|
|
||||||
> ${CLOG1}
|
|
||||||
> ${CLOG2}
|
|
||||||
|
|
||||||
PASSED_OPTIONS=""
|
PASSED_OPTIONS=""
|
||||||
|
|
||||||
if [ "${1}" == "-cleanup" ]; then
|
if [ "${1}" == "-cleanup" ]; then
|
||||||
@ -19,21 +15,23 @@ elif [ "${1}" == "-rc" ]; then
|
|||||||
PASSED_OPTIONS="-rc"
|
PASSED_OPTIONS="-rc"
|
||||||
else
|
else
|
||||||
cat << HLP
|
cat << HLP
|
||||||
$0: $0 -rc [-keep]
|
${SELF} -rc [-keep]
|
||||||
$0: $0 -cleanup
|
${SELF} -cleanup
|
||||||
HLP
|
HLP
|
||||||
exit 0
|
exit 101
|
||||||
fi
|
fi
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
#
|
#
|
||||||
|
> ${CLOG1}
|
||||||
|
> ${CLOG2}
|
||||||
DSTART=`date --utc`
|
DSTART=`date --utc`
|
||||||
printf "\n$0: Started at ${DSTART}"
|
printf "\n${SELF}: Started at ${DSTART}"
|
||||||
E1=`date '+%s'`
|
E1=`date '+%s'`
|
||||||
# require ^releng_, avoid running (your)self explcitly
|
# require ^releng_, avoid running (your)self explcitly
|
||||||
for s in `ls | grep ^releng_ | grep -v ${SELF} | sort`; do
|
for s in `ls | grep ^releng_ | grep -v ${SELF} | sort -n`; do
|
||||||
if [ -x ${s} -a ! -d ${s} ]; then
|
if [ -x ${s} -a ! -d ${s} ]; then
|
||||||
printf "\n$0: Running ./${s} ${PASSED_OPTIONS}..."
|
printf "\n${SELF}: Running ./${s} ${PASSED_OPTIONS}..."
|
||||||
T1=`date '+%s'`
|
T1=`date '+%s'`
|
||||||
set +e
|
set +e
|
||||||
./${s} ${PASSED_OPTIONS} 1>>${CLOG1} 2>>${CLOG2}
|
./${s} ${PASSED_OPTIONS} 1>>${CLOG1} 2>>${CLOG2}
|
||||||
@ -53,11 +51,11 @@ for s in `ls | grep ^releng_ | grep -v ${SELF} | sort`; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
DEND=`date --utc`
|
DEND=`date --utc`
|
||||||
printf "\n$0: Finished at ${DEND}.\n"
|
printf "\n${SELF}: Stopped at ${DEND}.\n"
|
||||||
E2=`date '+%s'`
|
E2=`date '+%s'`
|
||||||
let ES="${E2}-${E1}"
|
let ES="${E2}-${E1}"
|
||||||
printf "\n$0: Total time elapsed ${ES} sec."
|
printf "\n${SELF}: Total time elapsed ${ES} sec."
|
||||||
printf "\n$0: Results saved in ${CLOG1} and ${CLOG2}.\n\n"
|
printf "\n${SELF}: Results saved in ${CLOG1} and ${CLOG2}.\n\n"
|
||||||
|
|
||||||
#
|
#
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user