#!/bin/sh

# Writes out all files in a WSAD project which need to be stored by
# a revision control system.

[ $# -eq 1 ] || {
    echo "SYNTAX:  exportcc dest/dir" 1>&2
    exit 2
}

DEST="$1"; shift

for module in *; do
    rsync --exclude '**/com/ibm/' --exclude '**/org/omg/' --exclude '*.class' \
    --exclude 'EJS*.java' --exclude '_EJS*.java' --exclude '*_Stub.java'  \
    --exclude '**/*.?ar'  \
    -avH $module "$DEST"
done
