Commit 8d33d01e authored by Kevin Deldycke's avatar Kevin Deldycke

* Remove sticky options will updating via CVS

* Restore system rights
* Use constants


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5383 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0217081a
#!/bin/bash #!/bin/bash
MODULES="CMFActivity CMFCategory ERP5 ERP5Catalog \ # Modules to get from the CVS
ERP5Form ERP5SyncML ERP5Type ZSQLCatalog \ MODULES="CMFActivity CMFCategory ERP5 ERP5Catalog ERP5Form \
ERP5OOo ERP5Security erp5_bt5 erp5_banking" ERP5OOo ERP5Security ERP5SyncML ERP5Type ZSQLCatalog \
erp5_banking erp5_bt5"
#CVS_USER="seb" # CVS Users name
CVS_USER="anonymous" CVS_USER="anonymous" #CVS_USER="seb"
ANON_CVS="anonymous" ANON_CVS="anonymous"
# System user and group that own Zope product files
USER="zope"
GROUP="zope"
# Define paths
ZOPE_PRODUCTS="/usr/lib/zope/lib/python/Products"
EXTENSIONS_FOLDER="/var/lib/zope/Extensions"
BT5_FOLDER="/var/lib/zope/bt5"
LOGGED=0 LOGGED=0
ZERO=0 ZERO=0
export CVS_RSH=ssh export CVS_RSH=ssh
# Update each module # Update each module
for f in $MODULES for f in $MODULES
do do
echo "" echo ""
echo "----- Updating $f -----" echo "----- Updating $f -----"
if ls /usr/lib/zope/lib/python/Products/$f > /dev/null 2>&1 /dev/null; then if ls $ZOPE_PRODUCTS/$f > /dev/null 2>&1 /dev/null; then
cd /usr/lib/zope/lib/python/Products/$f && \ cd $ZOPE_PRODUCTS/$f && \
cvs update -RdP && cd /usr/lib/zope/lib/python/Products/ cvs update -RdPA && cd $ZOPE_PRODUCTS/
else else
if [ $CVS_USER == $ANON_CVS ] ; then if [ $CVS_USER == $ANON_CVS ] ; then
if [ $LOGGED == $ZERO ] ; then if [ $LOGGED == $ZERO ] ; then
cvs -d:pserver:anonymous@cvs.erp5.org:/cvsroot login cvs -d:pserver:anonymous@cvs.erp5.org:/cvsroot login
cvs -z3 -d:pserver:anonymous@cvs.erp5.org:/cvsroot co $f cvs -z3 -d:pserver:anonymous@cvs.erp5.org:/cvsroot co -A $f
LOGGED=1 LOGGED=1
else else
cvs -z3 -d:pserver:anonymous@cvs.erp5.org:/cvsroot co $f cvs -z3 -d:pserver:anonymous@cvs.erp5.org:/cvsroot co -A $f
fi fi
else else
cvs -z3 -d $CVS_USER@cvs.erp5.org:/cvsroot co $f cvs -z3 -d $CVS_USER@cvs.erp5.org:/cvsroot co -A $f
fi fi
fi fi
done done
# Restore good right
chown -R $USER.$GROUP .
# Replace symlinks installed by the default ERP5 installation by the new ones # Replace symlinks installed by the default ERP5 installation by the new ones
update_symlink() { update_symlink() {
...@@ -55,10 +74,6 @@ update_symlink() { ...@@ -55,10 +74,6 @@ update_symlink() {
fi fi
} }
EXTENSIONS_FOLDER="/var/lib/zope/Extensions"
BT5_FOLDER="/var/lib/zope/bt5"
for f in $MODULES for f in $MODULES
do do
if test $f = "ZSQLCatalog"; then if test $f = "ZSQLCatalog"; then
...@@ -75,4 +90,5 @@ for f in $MODULES ...@@ -75,4 +90,5 @@ for f in $MODULES
fi fi
done done
exit 0 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