Revision 16,
919 bytes
checked in by marcus, 14 years ago
(diff) |
r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines
Initial import
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #! /bin/csh |
---|
2 | # |
---|
3 | # file gfdlist.csh |
---|
4 | # =========== |
---|
5 | # |
---|
6 | # version 1, 20-Oct-2003 |
---|
7 | # |
---|
8 | # creates gfd file using gfdline |
---|
9 | # K. Stammler, 20-Oct-2003 |
---|
10 | |
---|
11 | set rootdir='.' |
---|
12 | set wildcard=\* |
---|
13 | set outfile="sfdfile.sfd" |
---|
14 | set reclth="" |
---|
15 | |
---|
16 | #set echo |
---|
17 | |
---|
18 | if ("$1" == "-h") then |
---|
19 | echo "Usage: $0 [<wild>] [<rootpath>] [<outfile>] [<quiet>] [<reclth>]" |
---|
20 | exit |
---|
21 | endif |
---|
22 | |
---|
23 | if ("$1" != "") set wildcard="$1" |
---|
24 | if ("$2" != "") set rootdir="$2" |
---|
25 | if ("$3" != "") set outfile="$3" |
---|
26 | set quiet="$4" |
---|
27 | if ("$5" != "") set reclth="$5" |
---|
28 | |
---|
29 | set scrfile=$outfile.x.$$ |
---|
30 | |
---|
31 | set flist=`find $rootdir -name "$wildcard" -type f -print` |
---|
32 | |
---|
33 | if ("$reclth" == "") then |
---|
34 | set q1="" |
---|
35 | else |
---|
36 | set q1="-gcfrec=$reclth" |
---|
37 | endif |
---|
38 | |
---|
39 | if (-e $scrfile) \rm $scrfile |
---|
40 | touch $scrfile |
---|
41 | foreach i ($flist) |
---|
42 | if (! -z $i) then |
---|
43 | if ("$4" != "quiet") echo "processing file $i" |
---|
44 | $SH_SOURCE/gcf/gfdline $q1 $i >>$scrfile |
---|
45 | endif |
---|
46 | end |
---|
47 | |
---|
48 | if (-e $outfile) \rm $outfile |
---|
49 | sort $scrfile >$outfile |
---|
50 | \rm $scrfile |
---|
Note: See
TracBrowser
for help on using the repository browser.