#! /bin/csh -f # create packed library if ( $#argv != 1 ) then echo "Usage: libpack filename" exit 1 endif set libpack = $argv[1] if ( ! -e HEADER ) then echo "HEADER file does not exist." exit 1 endif if ( ! -e LIBLIST ) then echo "LIBLIST file does not exist." exit 1 endif if ( -e $libpack ) then echo -n "$libpack already exists / Do you want to remove (y/n) ? " set line = $< if ( $line == y ) then \rm $libpack else echo "exit from libpack" exit 1 endif endif cat HEADER `cat LIBLIST` > $libpack echo "packed library $libpack is created."