#!/bin/tcsh -f

if ( $# < 2 ) then
	echo "Usage: update_lib <library> <file1> ..."
	exit 0
endif

set lib=$1
shift

foreach J ( $* )
	if ( ! -s "$J" ) then
		gunzip -f $J.gz
	endif
	if ( -s "$J" ) then
		ar rv $lib "$J"
	endif
end
