| 7 |
|
set nofile="none" |
| 8 |
|
set octree=$nofile |
| 9 |
|
set picture=$nofile |
| 10 |
+ |
set glarefile=$nofile |
| 11 |
|
if ($#argv >= 1) then |
| 12 |
|
set glarefile=$argv[1] |
| 13 |
< |
else |
| 14 |
< |
set glarefile=$nofile |
| 13 |
> |
if ($#argv >= 2) then |
| 14 |
> |
set picture=$argv[2] |
| 15 |
> |
if ($#argv >= 3) then |
| 16 |
> |
set octree=$argv[3] |
| 17 |
> |
endif |
| 18 |
> |
endif |
| 19 |
|
endif |
| 20 |
|
set rtargs= |
| 21 |
|
set view= |
| 60 |
|
octree. |
| 61 |
|
|
| 62 |
|
_EOF_ |
| 63 |
< |
readvar picture |
| 64 |
< |
readvar octree |
| 63 |
> |
if ( $picture == $nofile ) then |
| 64 |
> |
readvar picture |
| 65 |
> |
endif |
| 66 |
> |
if ( $octree == $nofile ) then |
| 67 |
> |
readvar octree |
| 68 |
> |
endif |
| 69 |
|
readvar view |
| 70 |
|
if ( $picture == $nofile && $octree == $nofile ) then |
| 71 |
|
echo "You must specify a picture or an octree" |
| 80 |
|
echo "Cannot read $picture" |
| 81 |
|
exit 1 |
| 82 |
|
endif |
| 83 |
< |
set fgargs=($fgargs -p $picture -vf $picture) |
| 83 |
> |
set fgargs=($fgargs -p $picture) |
| 84 |
> |
if ( "$view" != "" ) then |
| 85 |
> |
set view=(-vf $picture $view) |
| 86 |
> |
endif |
| 87 |
|
endif |
| 88 |
|
set fgargs=($fgargs $view) |
| 89 |
|
if ( $octree != $nofile ) then |
| 147 |
|
echo "Starting calculation..." |
| 148 |
|
echo findglare $fgargs |
| 149 |
|
findglare $fgargs > $glarefile |
| 150 |
+ |
if ($status) then |
| 151 |
+ |
echo "Uh-oh. Something went wrong with findglare\!" |
| 152 |
+ |
rm $glarefile |
| 153 |
+ |
exit 1 |
| 154 |
+ |
endif |
| 155 |
|
endif |
| 156 |
|
if ($?DISPLAY && $picture != $nofile) then |
| 157 |
|
echo "" |