Commit 370e3d2c authored by thomas.forbriger's avatar thomas.forbriger

[FEATURE] (util): let csbucscheck.sh output a title statement

parent 8f5f55a9
#!/bin/sh
#!/bin/bash
# this is <csbucscheck.sh>
# ----------------------------------------------------------------------------
#
......@@ -87,15 +87,15 @@ verbose=0
debug=0
# fetch commandline arguments
while getopts 'hvdr:b:' Option;
while getopts 'vdr:b:h' Option;
do
case ${Option} in
h) hflag=1
usage; longusage; exit 0;;
v) verbose=1;;
d) debug=1;;
r) TMPBASE=$1; shift;;
b) SHABIN=$1; shift;;
r) TMPBASE="$OPTARG";;
b) SHABIN="$OPTARG";;
*) echo -e "ERROR: Unimplemented option chosen.\n"
usage; exit 2;;
esac
......@@ -111,7 +111,7 @@ then
fi
TMPBASEDIR=$(dirname $TMPBASE)
if test ! ( -d $(dirname $TMPBASE) -a -w $(dirname $TMPBASE) )
if test ! \( -d $(dirname $TMPBASE) -a -w $(dirname $TMPBASE) \)
then
echo report output base directory $TMPBASEDIR is not a directory
echo or is not writable
......@@ -122,7 +122,7 @@ DATADIR=$1
TMPDIR=$TMPBASE/report_$(basename $0 .sh)_$(basename $DATADIR)_$$
mkdir -p $TMPDIR
if test ! ( -d $TMPDIR -a -w $TMPDIR )
if test ! \( -d $TMPDIR -a -w $TMPDIR \)
then
echo report output directory $TMPDIR is not a directory
echo or is not writable
......@@ -143,6 +143,19 @@ LOGLIST=
nmcs=0 # counter for missing checksums
nmf=0 # counter for missing files
# report
cat <<HERE
-----------------------------------------------------------------------
$0
$VERSION $(date)
going to verify csback supervised data directory tree in
$DATADIR
using $SHABIN
-----------------------------------------------------------------------
HERE
# ----------------------------------------------------------------------------
# cycle through all checksum files
# --------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment