#!/bin/sh

# add contents of repository into an archive

pn=`basename $0`

t=/tmp/$pn.$$
trap "rm -rf $t; exit 2" 1 2 3 15
rm -rf $t
mkdir $t

if [ $# -eq 1 -a -d ptrepository ]; then
	rep=ptrepository
elif [ $# -ne 2 -o ! -d "$2" ]; then
	echo "usage: $pn archive [ repository ]"
else
	rep="$2"
fi

n=1
for i in $2/*.o; do
	cp $i $t/${n}.o
	n=`expr $n+1`
