getEnv.php 752 Bytes
<?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;

?>