#! /bin/csh
# clp.csh
# CLIP Cshellscript equal to CLP.BAT
# Assumption: clip has been installed in directory ~/clip
source clp_env.dat

# test existance of environment vars CLIP_SRC & CLIP_TRG
if ( $?CLIP_SRC == 0  ||  $?CLIP_TRG == 0 ) then
   echo "..... Please define SOURCE and TARGET directories ....."
   echo "..... You can use  clip_env.csh  for this purpose ....."
   exit
endif

#  :create_INI_file
echo "..... CLiP the sourcefiles that are given as arguments ....."
echo "..... Report file is CLIP.RPT                          ....."

if (-f CLIP.INI) then
	unalias rm	 
	rm CLIP.INI
endif


echo This file contains data that is needed to run CLiP  > CLIP.INI
echo And is generated by CLiP_MENU                      >> CLIP.INI
echo Modifying this file at own risk.                   >> CLIP.INI
echo Using CLiP_MENU is definitely recommended.         >> CLIP.INI
echo ""                                                 >> CLIP.INI
echo INTERACTIVE_MODE                                   >> CLIP.INI
echo NO                                                 >> CLIP.INI
echo BOTH                                               >> CLIP.INI
echo "(*      "                                         >> CLIP.INI
echo "*)      "                                         >> CLIP.INI
echo "*       "                                         >> CLIP.INI
echo ENDOF                                              >> CLIP.INI
echo "#       "                                         >> CLIP.INI
echo OMITTED                                            >> CLIP.INI
echo ------------ REPORT FILE -----------               >> CLIP.INI
echo clip.rpt                                           >> CLIP.INI
echo ------------ INPUT FILES -----------               >> CLIP.INI
if ( .$1 != . ) echo $CLIP_SRC/$1 			>> CLIP.INI
if ( .$2 != . ) echo $CLIP_SRC/$2 			>> CLIP.INI
if ( .$3 != . ) echo $CLIP_SRC/$3 			>> CLIP.INI
if ( .$4 != . ) echo $CLIP_SRC/$4 			>> CLIP.INI
if ( .$5 != . ) echo $CLIP_SRC/$5 			>> CLIP.INI
if ( .$6 != . ) echo $CLIP_SRC/$6 			>> CLIP.INI
if ( .$7 != . ) echo $CLIP_SRC/$7 			>> CLIP.INI
if ( .$8 != . ) echo $CLIP_SRC/$8 			>> CLIP.INI
if ( .$9 != . ) echo $CLIP_SRC/$9			>> CLIP.INI
echo ------------ MODULES ---------------               >> CLIP.INI
echo ------------ MODULE DIRECTORY ------               >> CLIP.INI
echo $CLIP_TRG"/"                                       >> CLIP.INI
echo ------------ END OF INI FILE -------               >> CLIP.INI

set CLIP_DIR = ~/clip
$CLIP_DIR/clip

# end of Cshellscript +++++++++++++++++++++++++++++++++++++++++++++++
