-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcallJSONDataCheck.sh
More file actions
executable file
·73 lines (58 loc) · 1.58 KB
/
callJSONDataCheck.sh
File metadata and controls
executable file
·73 lines (58 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
PROJECT='jsondata'
VERSION="0.0.8"
RELEASE="0.0.8"
AUTHOR='Arno-Can Uestuensoez'
COPYRIGHT='Copyright (C) 2015-2016 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez'
LICENSE='Artistic-License-2.0 + Forced-Fairplay-Constraints'
export PYTHONPATH=$PYTHONPATH:$PWD
MYPATH=${BASH_SOURCE%/*}/
X=$*
if [ "X${X}" != "X${X#*-- }" ];then
CALL="python ${X%%-- *} ${MYPATH}bin/jsondatacheck ${X##*-- }"
else
CALL="python ${MYPATH}bin/jsondatacheck ${@}"
if [ "X${X}" != "X${X#*-h}" -o "X${X}" != "X${X#*--help}" ];then
_HELP=1
fi
fi
helpOnWrapper () {
cat <<EOF
SYNOPSIS:
${0##*/} [OPTIONS]
DESCRIPTION: CALL-WRAPPER
The "${0##*/}" is a slim call wrapper for R&D with a few settings.
The main task is to provide the current context for the
"jsondatacheck.py"
by temporary setting of PYTHONPATH.
OPTIONS:
[python-options]
See REMARKS.
[jsondatacheck.py-options]
See REMARKS.
REMARKS:
Python options could be passed through the wrapper by the call:
${0##*/} <python-pass-trough-options> -- <jsondatacheck-options>
resulting in:
python <python-pass-trough-options> jsondatacheck <jsondatacheck-options>
AUTHOR:
Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez
COPYRIGHT:
Copyright (C) 2015,2016 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez
LICENSE:
For the wrapper itself: Apache-2.0
EOF
read -p "For help on 'jsondatacheck' press [yY]:"
case $REPLY in
[yY])$CALL;;
esac
}
if [ "X${_HELP}" == "X1" ];then
helpOnWrapper
exit 0
fi
echo "CALL=<$CALL>"
$CALL
ret=$?
if [ $ret -eq 0 -a "X${_HELP}" == "X1" ];then
helpOnWrapper
fi