Index: openacs-4/etc/install/install.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/install.sh,v diff -u -r1.40 -r1.41 --- openacs-4/etc/install/install.sh 26 Jan 2004 13:29:25 -0000 1.40 +++ openacs-4/etc/install/install.sh 23 Feb 2004 15:49:14 -0000 1.41 @@ -321,7 +321,7 @@ # ###################################################################### -if parameter_true $do_checkout; then +if parameter_true $do_checkout || [ $do_checkout == "up" ] ; then # The pre_checkout script can move away any files or changes # to the source tree that we want to keep (for example an @@ -355,9 +355,15 @@ exit fi - echo "$(date): Checking out OpenACS" - chmod +x checkout.sh - config_file=$config_file dotlrn=$dotlrn ./checkout.sh + if [ $do_checkout == "up" ] ; then + echo "$(date): Doing cvs update" + chmod +x updateserver.sh + ./updateserver.sh $serverroot + else + echo "$(date): Checking out OpenACS" + chmod +x checkout.sh + config_file=$config_file dotlrn=$dotlrn ./checkout.sh + fi #----------------------------------------------------------------- # The post_checkout script can copy back any files (AOLServer config files, Index: openacs-4/etc/install/updateserver.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/updateserver.sh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/etc/install/updateserver.sh 23 Feb 2004 15:49:14 -0000 1.1 @@ -0,0 +1,51 @@ +#!/bin/bash +# +# Usage: updateserver.sh +# +# Update an OpenACS and .LRN source tree without checking out new packages +# but still checking out new dirs in current packages and the www root dir. +# Does the update as the anonymous user to avoid any password issues. +# +# by Peter Marklund + +server_root=$1 +packages_root=${server_root}/packages +root_dirs="www etc" + +cvs_args_with_dir="-f -q update -Pd" +cvs_args_no_dir="-f -q update -P" +oacs_cvs="cvs -d :pserver:anonymous@openacs.org:/cvsroot" +lrn_cvs="cvs -d :pserver:anonymous@dotlrn.openacs.org:/dotlrn-cvsroot" + +# CVS update in root without new dirs +echo "$0 - Updating in root dir $server_root" +cd $server_root +$oacs_cvs $cvs_args_no_dir + +# Update all packages with new dirs +echo "$0 - Updating all packages" +cd $packages_root +for dir in $(find -maxdepth 1 -type d|grep -v CVS|egrep -v '^\.$') +do + cd $dir + echo "$0 - Updating package $dir" + + dotlrn_p=$(grep dotlrn CVS/Root) + if [ -z "$dotlrn_p" ]; then + cvscommand=$oacs_cvs + else + cvscommand=$lrn_cvs + fi + + $cvscommand $cvs_args_with_dir + cd .. +done + +# Update www root dir with new dirs +for root_dir in $root_dirs +do + root_path="${server_root}/${root_dir}" + echo "$0 - Updating dir $root_path" + cd $root_path + $oacs_cvs $cvs_args_with_dir +done