Commit 21b7eaa5 authored by Kevin Deldycke's avatar Kevin Deldycke

Update symlink too


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5347 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b61c2e3b
#!/bin/bash
#CVS_USER=seb
CVS_USER=anonymous
MODULES="CMFActivity CMFCategory ERP5 ERP5Catalog \
ERP5Form ERP5SyncML ERP5Type ZSQLCatalog \
ERP5OOo ERP5Security erp5_bt5 erp5_banking"
ANON_CVS=anonymous
#CVS_USER="seb"
CVS_USER="anonymous"
ANON_CVS="anonymous"
LOGGED=0
ZERO=0
export CVS_RSH=ssh
for f in CMFActivity CMFCategory ERP5 ERP5Catalog \
ERP5Form ERP5SyncML ERP5Type ZSQLCatalog \
ERP5OOo ERP5Security erp5_bt5 erp5_banking
# Update each module
for f in $MODULES
do
echo "XXXXX Updating..." $f
echo ""
echo "----- Updating $f -----"
if ls /usr/lib/zope/lib/python/Products/$f > /dev/null 2>&1 /dev/null; then
cd /usr/lib/zope/lib/python/Products/$f && \
cvs update -RdP && cd /usr/lib/zope/lib/python/Products/
......@@ -33,3 +36,43 @@ for f in CMFActivity CMFCategory ERP5 ERP5Catalog \
fi
done
# 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 "----- Symlink updated: $BASE/$SOURCE -> $DESTINATION"
fi
}
EXTENSIONS_FOLDER="/var/lib/zope/Extensions"
BT5_FOLDER="/var/lib/zope/bt5"
for f in $MODULES
do
if test $f = "ZSQLCatalog"; then
echo `update_symlink $EXTENSIONS_FOLDER zsqlbrain.py ../Products/ZSQLCatalog/zsqlbrain.py`
fi
if test $f = "ERP5"; then
echo `update_symlink $EXTENSIONS_FOLDER InventoryBrain.py ../Products/ERP5/Extensions/InventoryBrain.py`
fi
if test $f = "erp5_bt5"; then
echo `update_symlink $BT5_FOLDER erp5_bt5 ../Products/erp5_bt5`
fi
if test $f = "erp5_banking"; then
echo `update_symlink $BT5_FOLDER erp5_banking ../Products/erp5_banking`
fi
done
exit 0
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