summaryrefslogtreecommitdiff
path: root/solenv/bin/lo_proxy_start
blob: 8aabf2838acd057a0a8c23b4f6d638fc5c321379 (plain)
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
#!/usr/bin/env bash

bin_dir=$(dirname $0)
action=$(basename $0)

if [ "$action" = "lo_proxy_start" ] ; then
    action=$1
    shift
fi

if [ -z "$SRC_ROOT" ] ; then
   SRC_ROOT=$($bin_dir/lo_find_src_root) || exit 1
fi
if [ -z "$SOLARINC" ] ; then
    if [ -e "$SRC_ROOT/config_host.mk" ] ; then
        . "$SRC_ROOT/config_host.mk"
    fi
    if [ -e "$SRC_ROOT/Env.Host.sh" ] ; then
        . "$SRC_ROOT/Env.Host.sh"
    fi
fi

if [ -e $SRC_ROOT/solenv/bin/$action.pl ] ; then
   $SRC_ROOT/solenv/bin/$action.pl "$@"
elif [ -e $SRC_ROOT/solenv/bin/$action.sh ] ; then
   $SRC_ROOT/solenv/bin/$action.sh "$@"
else
   echo "$action.[pl|sh] not found" 2>&1
   exit 1
fi