#!/bin/bash

EXCL=/tmp/rcspack-exclude

echo "api/devmanual
api/odk
api/sdk_oo
api/www
external/addons
external/atk
external/gtk
external/glib2
external/libjpeg
external/jpeg
external/libpng
external/libxml2
external/moz
external/pango
external/pkgconfig
external/python
external/www
external/zlib
framework/binfilter
framework/www
script/www
sw/www
sc/www
xml/www" > $EXCL

package_rcs_dir()
{
    ARCHIVE=$1;
    shift
    echo "Archiving $ARCHIVE: $*"
    tar czf $ARCHIVE.tar.gz -X $EXCL $*
}

package_rcs_dir "api_dba" "api" "dba"
package_rcs_dir "external" "external"
package_rcs_dir "fwk_gsl" "framework" "graphics" "gsl"
package_rcs_dir "installation" "installation"
package_rcs_dir "small" "l10n" "lingucomponent" "oi" "porting" "test" "ui" "xml" "whiteboard"
package_rcs_dir "apps" "sc" "script" "sw"
package_rcs_dir "tools_uno" "tools" "ucb" "udk" "util"
