Commit b07a4ec2 authored by Kevin Deldycke's avatar Kevin Deldycke

New script to get latest ERP5 stuffs from our brand new SVN repository.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6473 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b3c45876
#!/bin/bash
# Modules to get from the SVN
PRODUCTS="CMFActivity CMFCategory ERP5 ERP5Catalog ERP5Form \
ERP5OOo ERP5Security ERP5SyncML ERP5Type ZSQLCatalog"
# System user and group that own Zope product files
USER="zope"
GROUP="zope"
# Define paths
ZOPE_PRODUCTS="/var/lib/zope/Products"
EXTENSIONS_FOLDER="/var/lib/zope/Extensions"
BT5_FOLDER="/var/lib/zope/bt5"
# Update each product
for p in $PRODUCTS
do
echo ""
echo "----- Updating $p -----"
if ls $ZOPE_PRODUCTS/$p > /dev/null 2>&1 /dev/null; then
svn update --non-interactive $p
else
svn checkout --non-interactive https://svn.erp5.org/repos/public/erp5/trunk/products/$p
fi
done
# Get latests Business Templates
echo ""
echo "----- Updating Business Templates -----"
wget -nv --no-clobber --no-host-directories -r --level=2 --relative --no-parent --accept=bt5,bt5list http://torrent.erp5.org/bt5/
rm -f robots.txt
# Restore good right
chown -R $USER.$GROUP .
# Replace symlinks installed by the default ERP5 installation by the new ones
update_symlink() {
BASE=$1
SOURCE=$2
DESTINATION=$3
# If a previous symlink exist delete it
cd $BASE
if test -h $SOURCE; then
rm -f $SOURCE
fi
# If there is no $SOURCE file, create a symlink
if [ ! -e $SOURCE ]; then
ln -s $DESTINATION
echo ""
echo "----- Symlink updated: $BASE/$SOURCE -> $DESTINATION"
fi
}
for p in $PRODUCTS
do
if test $p = "ZSQLCatalog"; then
echo `update_symlink $EXTENSIONS_FOLDER zsqlbrain.py ../Products/ZSQLCatalog/zsqlbrain.py`
fi
if test $p = "ERP5"; then
echo `update_symlink $EXTENSIONS_FOLDER InventoryBrain.py ../Products/ERP5/Extensions/InventoryBrain.py`
fi
if test $p = "bt5"; then
echo `update_symlink $BT5_FOLDER erp5_bt5 ../Products/bt5`
fi
done
exit 0
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment