Blame view

php/getEnv.php 785 Bytes
2d0ca0ba   Benjamin Renard   Load environment ...
1
2
3
4
5
6
7
8
9
10
<?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',
99ae8744   Benjamin Renard   Use config variab...
11
	'AMDA_KERNEL_DIR',
c0b8b730   Benjamin Renard   Re-use variables ...
12
13
	'COTS_BASE_DIR',
	'KERNEL_BUILD_TYPE',
2d0ca0ba   Benjamin Renard   Load environment ...
14
	'PROXY_HOST',
ba35574d   Benjamin Renard   Uniformize proxy ...
15
	'PROXY_USERPWD',
2d0ca0ba   Benjamin Renard   Load environment ...
16
	'DD_WSDL',
99ae8744   Benjamin Renard   Use config variab...
17
18
19
20
21
22
23
24
25
26
	'DATAPATH',
	'PARAMS_LOCALINFO_DIR',
	'PARAMS_LOCALDB_DIR',
	'LocalData',
	'ParamTemplate',
	'MissionInfo',
	'InstrumentInfo',
	'DataSetInfo',
	'HelpAuto',
	'RemoteData',
fa544567   Benjamin Renard   First implementat...
27
28
	'HAPIData',
	'HAPISERVER_PATH',
2d0ca0ba   Benjamin Renard   Load environment ...
29
30
31
32
33
34
35
36
37
38
39
);

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;

?>