# -*-Shell-script-*-
#
# This file is not a stand-alone shell script; it provides functions for 
# mcinfo-extension.

LOG_TEMP=/var/tmp/mcinfo/outfiles
LOG_STDOUT=0

do_cp()
{
    SRC="$1"

    if [ $LOG_STDOUT = 0 ]; then
        if [ -d "$SRC" ]; then
            cp -x --parent -pRL $SRC $LOG_TEMP
            find $LOG_TEMP/$SRC -type b -o -type c | xargs rm -f 2> /dev/null
        fi
        if [ -f "$SRC" ]; then
            cp --parent -pRL $SRC $LOG_TEMP
        fi
    else
        for i in `find "$SRC" -xtype f 2> /dev/null`; do
            echo "=== ${CMDNAME}: $i ==="
            cat "$i" 2>&1
            echo
        done
    fi
}


