#!/bin/sh

set -x

if [ `uname` = "SunOS" ] ; then
  TAR=gtar
  CP="cp -r"
else
  TAR=tar
  CP="cp -a"
fi


# Copy all files pertaining to nxclient
# to a temporary directory.

mkdir t 2>/dev/null

cd t 2>/dev/null || exit

$CP ../nxclient . || exit

# Clean all in nxclient directory.

cd nxclient || exit

make distclean

cd ..

# Make the tarfile.

$TAR zcvf ../nxclient-XXX.tar.gz nxclient
