#!/bin/sh
PATH=/bin:/usr/bin:/usr/contrib/bin:/usr/local/bin

if [ $# = 0 ]; then
	echo untgz - show contents of tar.gz archives
	echo usage: untgz files...
	exit 1
fi

for file in $*; do
	gunzip -cdq $file | tar -tvf -
	if [ $? != 0 ]; then
		exit 1;
	fi
done

exit 0
