blob: 6e473cdf4bc75a37ae20a49bf9ce82ba8ca997e8 [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
Thomas Vachuskab51b8bc2015-07-27 08:37:12 -07006#sleep 5 && exit 0;
7
Thomas Vachuska4bfccd542015-05-30 00:35:25 -07008env=$1 && shift
9cwd=$1 && shift
10
11if [ $env != "-" -a $env != "~" ]; then
12 [ ! -f $env ] && echo "$env file not found" && exit 1
13 source $env
14fi
15
16if [ $cwd != "-" ]; then
17 [ ! -d $cwd ] && echo "$cwd directory not found" && exit 1
18 cd $cwd
19fi
20
Thomas Vachuskaf9c84362015-04-15 11:20:45 -070021"$@" 2>&1
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070022status=$?
23
24[ $env != "~" ] && exit $status
25exit 0