summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/utils/stc/bin/stc-launcher
blob: 0d56017e4f5f96e6f153007c5ae27746e8ca90b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#-------------------------------------------------------------------------------
#   System Test Coordinator process launcher
#-------------------------------------------------------------------------------

env=$1 && shift
cwd=$1 && shift

if [ $env != "-" ]; then
    [ ! -f $env ] && echo "$env file not found" && exit 1
    source $env
fi

if [ $cwd != "-" ]; then
    [ ! -d $cwd ] && echo "$cwd directory not found" && exit 1
    cd $cwd
fi

"$@" 2>&1