#! /bin/sh

# $Progeny$

# This program is in the public domain.

# Too bad we don't have something like sysexits.h for POSIX sh...
EX_USAGE=64

usage ()
{
    cat <<EOF
usage: $0 DISTDIR DISTFILE [DISTFILE ...]
EOF
}

if [ $# -ne 1 ]; then
    usage
    exit ${EX_USAGE}
fi

distdir=$1
distfile=${distdir}.tar.bz2

set -e

tar -cf - ${distdir} | bzip2 > ${distfile}

exit 0
