#!/bin/sh # # Script to update the Pencil-Code tree from CVS # # Update all the necessaries but nothing else. # (eg. miss out the runs directory) # cmdname=`basename $0` warn_sticky() { [ $1 ] || return cat </dev/null; do case $1 in -a) include_rundirs=1 ;; -A) EXTRA_ARGS=-A echo "Found STICKY CLEANER" ;; -A) EXTRA_ARGS=-A echo "Found STICKY CLEANER" shift ;; --all) include_rundirs=1 esac # catch other arguments EXTRA_ARGS=$1 shift done cd ${PENCIL_HOME} EXTRA_ARGS="$EXTRA_ARGS $@" UPDATE_PATHS="src bin lib idl license" UPDATE_PATHS_NONEWDIR="" # Conditionally add some other directories to the full update # (if they exist!) add_update_path samples doc # Add other, perhaps personal trees to the shallow update [ $include_rundirs ] && add_update_path_nonewdir runs pencil-runs [ $include_rundirs ] && add_update_path_nonewdir tony pencil-tony [ $include_rundirs ] && add_update_path_nonewdir anders pencil-anders # Shallow update other paths in the selected subdirectories if [ "$UPDATE_PATHS_NONEWDIR" ]; then echo "Updating the subtrees of $PENCIL_HOME ($UPDATE_PATHS_NONEWDIR)" cvs -q up -P $EXTRA_ARGS $UPDATE_PATHS_NONEWDIR check_for_sticky $UPDATE_PATHS_NONEWDIR fi # Update files in the PENCIL_HOME root echo "Updating the root of $PENCIL_HOME" cvs -q up -l $EXTRA_ARGS . check_for_sticky_local . # Update files in the selected subdirectories echo "Updating the subtrees of $PENCIL_HOME ($UPDATE_PATHS)" cvs -q up -dP $EXTRA_ARGS $UPDATE_PATHS check_for_sticky $UPDATE_PATHS