I made a script to rebuild dspace 1.6.2
I like to know what you think, if you think it is OK, or is there
something wrong, or can be improved.
Thanks
Notes:
[dspace-source] --> /opt/dspace-1.6.2-src-repo
[dspace] --> /repo
[tomcat_webapps_dir] --> /var/lib/tomcat5.5/webapps
"dspace.cfg" changes are always made in
[dspace-source]/dspace/config/dspace.cfg
There are other repositories (dspace) on the same machine
file_name: recompile.sh
CODE:
#!/bin/sh
#removes all old compiled code and recompiles all DSpace code
and rebuilds the DSpace installation package
##
#change to "[dspace-src]/dspace" dir
cd /opt/dspace-1.6.2-src-repo/dspace
# rebuild with maven
mvn package
# change to target build dir
cd target/dspace-1.6.2-build.dir
#clear cache if other repositories have been rebuilt previously
- Removes the previously compiled code
ant clean
#Update ${dspace.dir} config, etc, lib and web applications
ant update
#Update ${dspace.dir]/config/ directory with new configuration
files" (¿redundant?)
ant update_configs
#copy the new dspace.cfg to /repo/config/dspace.cfg (¿redundant?)
cp config/dspace.cfg /materialesdocentes/config/dspace.cfg
# stop tomcat
/etc/init.d/tomcat5.5 stop
#/usr/share/tomcat5.5/bin/shutdown.sh
# delete old tomcat webapps aplications
rm -rf /var/lib/tomcat5.5/webapps/repo*
rm -rf /var/lib/tomcat5.5/work/Catalina/localhost/repo*
# change to dspace installation dir
cd /repo
# copy rebuilded web apps to tomcat webapps dir
cp -r webapps/jspui /var/lib/tomcat5.5/webapps/repo
cp -r webapps/oai /var/lib/tomcat5.5/webapps/repo-oai
cp -r webapps/lni /var/lib/tomcat5.5/webapps/repo-lni
cp -r webapps/solr /var/lib/tomcat5.5/webapps/repo-solr
cp -r webapps/sword /var/lib/tomcat5.5/webapps/repo-sword
cp -r webapps/xmlui /var/lib/tomcat5.5/webapps/repo-xmlui
# restart tomcat
JAVA_HOME=`ls -td /usr/lib/jvm/java-6-sun | head -1`
if [ -d ${JAVA_HOME} ]
then
export JAVA_HOME
export PATH=${JAVA_HOME}/bin:$PATH
fi
/etc/init.d/tomcat5.5 start
------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful,
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance.
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech