Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
csback
Commits
370e3d2c
Commit
370e3d2c
authored
Jun 13, 2016
by
thomas.forbriger
Browse files
[FEATURE] (util): let csbucscheck.sh output a title statement
parent
8f5f55a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
util/csbucscheck.sh
View file @
370e3d2c
#!/bin/sh
#!/bin/
ba
sh
# this is <csbucscheck.sh>
# ----------------------------------------------------------------------------
#
...
...
@@ -87,15 +87,15 @@ verbose=0
debug
=
0
# fetch commandline arguments
while
getopts
'
h
vdr: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
# --------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment