Project

General

Profile

Climate4impact update scripts

Update adagucserver:

#/bin/bash

adagucexecutable=$(cat ~/impactportal/config.xml  | grep adagucexecutable)
adagucserverlocation="${adagucexecutable/<adagucexecutable>/""}" 
adagucserverlocation="${adagucserverlocation/<\/adagucexecutable>/""}" 
adagucserverlocation="${adagucserverlocation/adagucserverEC\/adagucserver/""}" 
adagucserverlocation="${adagucserverlocation/bin\/adagucserver/""}" 
echo $adagucserverlocation
cd $adagucserverlocation

if [ -z "${stat}" ]; then echo "[OK] No changes in adagucserver repo found."; else 
echo "Uncommited changes in adagucserver repo: $stat" 
exit
fi

cd $adagucserverlocation
hg pull
hg update
bash compile.sh

Update impactportalwpsscripts

#/bin/bash

impactportalwpsscripts=$(cat ~/impactportal/config.xml  | grep PYWPS_PROCESSES)
impactportalwpsscripts="${impactportalwpsscripts/<exportenvironment>/""}" 
impactportalwpsscripts="${impactportalwpsscripts/<\/exportenvironment>/""}" 
impactportalwpsscripts="${impactportalwpsscripts/PYWPS_PROCESSES=/""}" 

echo $impactportalwpsscripts
cd $impactportalwpsscripts

if [ -z "${stat}" ]; then echo "[OK] No changes in impactportalwpssscripts repo found."; else 
echo "Uncommited changes in impactportalwpssscripts repo: $stat" 
exit
fi

cd $impactportalwpsscripts
hg pull
hg update

Update impactportal and adagucviewer

#/bin/bash

# First check if impactportal repo has changed
cd $C4I_DEV_HOME
cd impactportal
stat=$(hg stat)

if [ -z "${stat}" ]; then echo "[OK] No changes in impactportal repo found."; else 
echo "Uncommited changes in impactportal repo: $stat" 
exit
fi

# First check if adagucviewer repo has changed
cd WebContent/adagucviewer/
cp config.js.default config.js # Copy original js file
stat=$(hg stat)
cp configc4i.js config.js # Put back c4i config js file
if [ -z "${stat}" ]; 
then echo "[OK] No changes in adagucviewer repo found."; 
else
echo "Uncommited changes in adagucviewer repo: $stat" 
exit
fi

cd ../../

#Update impactportal

echo "Start pull impactportal" 

hg pull
hg update

# Update ADAGUC

echo "Start pull adagucviewer" 

cd WebContent/adagucviewer/
cp config.js.default config.js
hg pull
hg update
cp configc4i.js config.js

echo "[OK] Done. Now do (1) refresh, clean and rebuild the project; (2) republish and restart the tomcat server."