getEnv.php
752 Bytes
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
32
33
34
35
36
37
<?php
if (php_sapi_name() !='cli') die("This script can be only executed from command line");
require_once("config.php");
$variables = array(
'AMDA_SPASE_INTERFACE',
'NEWMETA',
'AMDAINTERNALDIR',
'AMDA_KERNEL_DIR',
'COTS_BASE_DIR',
'KERNEL_BUILD_TYPE',
'PROXY_HOST',
'PROXY_USERPWD',
'DD_WSDL',
'DATAPATH',
'PARAMS_LOCALINFO_DIR',
'PARAMS_LOCALDB_DIR',
'LocalData',
'ParamTemplate',
'MissionInfo',
'InstrumentInfo',
'DataSetInfo',
'HelpAuto',
'RemoteData',
);
foreach ($variables as $variable) {
$value = defined($variable) ? constant($variable) : "";
echo "export $variable=\"$value\"".PHP_EOL;
}
echo "export LD_LIBRARY_PATH=\"".getenv('LD_LIBRARY_PATH')."\"".PHP_EOL;
echo "export PATH=\"".getenv('PATH')."\"".PHP_EOL;
?>