now view launches sub-view program
This commit is contained in:
parent
8739595594
commit
dbed7e5692
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
# (1) Primary init.
|
||||||
|
#--------------------------------------------------------#
|
||||||
|
# (1) Get absolute folder #
|
||||||
|
ROOT=$(dirname `realpath $0`);
|
||||||
|
|
||||||
|
# (2) Check lock file #
|
||||||
|
test ! -f $ROOT/.lock && echo "Daemon not started" && exit 1;
|
||||||
|
|
||||||
|
# (3) Check argument #
|
||||||
|
test $# -lt 1 && echo -e "ERR: Missing argument\n\n\tgpio\tGPIO real-time view\n\tsystemd\tSystemd real-time dependency tree\n\tlogs\tLogs real-time view\n" && exit 1;
|
||||||
|
|
||||||
|
# (4) Check argument binds to an actual file #
|
||||||
|
test ! -f $ROOT/sub-view/$1 && echo -e "ERR: No such value for argument" && exit 1;
|
||||||
|
|
||||||
|
|
||||||
|
# (2) Start sub-view
|
||||||
|
#--------------------------------------------------------#
|
||||||
|
$ROOT/sub-view/$1;
|
Loading…
Reference in New Issue