version 1.83, 2015/03/30 15:17:12
|
version 1.84, 2015/03/30 17:31:31
|
|
|
echo "done" | echo "done" |
echo | echo |
| |
# Site Localization |
####################### |
|
## Site Localization ## |
|
####################### |
| |
# Path to the configuration file - at some point, make this an argument to the configure script | # Path to the configuration file - at some point, make this an argument to the configure script |
set LOCALIZATIONDIR = "" | set LOCALIZATIONDIR = "" |
|
|
# Make the path absoluate | # Make the path absoluate |
set LOCALIZATIONDIR = ${PWD}/${RELLOCALIZATIONDIR} | set LOCALIZATIONDIR = ${PWD}/${RELLOCALIZATIONDIR} |
| |
# Eventually, dump all these generated files into a user-specified location. |
# Reset localization. |
|
if ($CLEAN == "yes") then |
# This script will need to read the config.local file to get the | # This script will need to read the config.local file to get the |
# localization directory. Otherwise, just use JSOC/localization as the default. | # localization directory. Otherwise, just use JSOC/localization as the default. |
if (!(-d ${LOCALIZATIONDIR})) then | if (!(-d ${LOCALIZATIONDIR})) then |
|
|
rm ${LOCALIZATIONDIR}/drmsparams.py | rm ${LOCALIZATIONDIR}/drmsparams.py |
endif | endif |
| |
# Must create the scripts subdirectory before the call to gen_init.csh |
|
if (!(-d scripts)) then |
|
mkdir scripts |
|
endif |
|
|
|
if (!(-e configsdp.txt)) then | if (!(-e configsdp.txt)) then |
# This is NetDRMS. | # This is NetDRMS. |
if (!(-e config.local)) then | if (!(-e config.local)) then |
|
|
endif | endif |
endif | endif |
| |
if ($CLEAN == "yes") then |
|
# We now call localize.py for both Stanford and NetDRMS builds. | # We now call localize.py for both Stanford and NetDRMS builds. |
if ($CFGSERVER == "yes") then | if ($CFGSERVER == "yes") then |
$PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams -s | $PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams -s |
else | else |
$PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams | $PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams |
endif | endif |
endif |
endif # End reset localization |
| |
echo "Setting links to scripts..." | echo "Setting links to scripts..." |
|
if (!(-d scripts)) then |
|
mkdir scripts |
|
endif |
|
|
|
if ($CLEAN == "yes") then |
cd scripts | cd scripts |
| |
# Sums scripts | # Sums scripts |
|
|
if (-x ${LOCALIZATIONDIR}/configure) then | if (-x ${LOCALIZATIONDIR}/configure) then |
${LOCALIZATIONDIR}/configure | ${LOCALIZATIONDIR}/configure |
endif | endif |
|
|
cd .. | cd .. |
|
endif |
|
|
echo "done" | echo "done" |
echo | echo |
| |
|
|
cd ../.. | cd ../.. |
endif | endif |
| |
|
if ($CLEAN == "yes") then |
cd base/include | cd base/include |
find .. -path '../include' -prune -o -name \*.h -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print " " . $path . " OK\n"; } else { print " " . $path . " ERROR - could not create link\n"; } }' | find .. -path '../include' -prune -o -name \*.h -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print " " . $path . " OK\n"; } else { print " " . $path . " ERROR - could not create link\n"; } }' |
cd ../.. | cd ../.. |
|
|
if (-d ../base/include) then | if (-d ../base/include) then |
find ../base/include -name \*.h -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print " " . $path . " OK\n"; } else { print " " . $path . " ERROR - could not create link\n"; } }' | find ../base/include -name \*.h -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print " " . $path . " OK\n"; } else { print " " . $path . " ERROR - could not create link\n"; } }' |
endif | endif |
|
cd .. |
|
endif |
| |
|
cd include |
# ${LOCALIZATIONDIR} is an absolute path | # ${LOCALIZATIONDIR} is an absolute path |
if (!(-l drmsparams.h)) then | if (!(-l drmsparams.h)) then |
ln -s ../${RELLOCALIZATIONDIR}/drmsparams.h | ln -s ../${RELLOCALIZATIONDIR}/drmsparams.h |