#!/bin/sh
#**********************************************************************
#  Copyright(C) 1996, 1997 Network Flight Recorder, Inc.
#  All rights reserved.
#
#  Use and distribution of this software and its source code 
#  are governed by the terms and conditions of the 
#  Network Flight Recorder Software License ("LICENSE.TXT")  
#**********************************************************************
#
# This is an example of what you can do with scripts
#
# tarfile output-filename
#
PATH=/usr/bin:/bin

if [ $# -lt 2 ]
then
        echo "usage: $0 tarfile file-to-archive [...]"
        exit 1
fi

tarfile=$1
shift

if [ ! -f $tarfile ]
then
        OPT=c
else
        OPT=u
fi

for filename in $@
do
    tar ${OPT}f $tarfile $filename
done
