blob: d5da4f191903a1f1cc1cde67427d06bdb0c074cb [file] [log] [blame]
Thomas Vachuskaf9c84362015-04-15 11:20:45 -07001#!/bin/bash
2#-------------------------------------------------------------------------------
3# System Test Coordinator process launcher
4#-------------------------------------------------------------------------------
Thomas Vachuska4bfccd542015-05-30 00:35:25 -07005
6env=$1 && shift
7cwd=$1 && shift
8
9if [ $env != "-" -a $env != "~" ]; then
10 [ ! -f $env ] && echo "$env file not found" && exit 1
11 source $env
12fi
13
14if [ $cwd != "-" ]; then
15 [ ! -d $cwd ] && echo "$cwd directory not found" && exit 1
16 cd $cwd
17fi
18
Thomas Vachuskaf9c84362015-04-15 11:20:45 -070019"$@" 2>&1
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070020status=$?
21
22[ $env != "~" ] && exit $status
23exit 0