| 28 |
INDIR="/u/edhill/Mail/MITgcm-test" |
INDIR="/u/edhill/Mail/MITgcm-test" |
| 29 |
OUTDIR= |
OUTDIR= |
| 30 |
TEMPDIR=./ptmp |
TEMPDIR=./ptmp |
| 31 |
MUNPACK=/usr/local/bin/munpack |
MUNPACK=/u/edhill/local/bin/munpack |
| 32 |
|
|
| 33 |
# Parse options |
# Parse options |
| 34 |
ac_prev= |
ac_prev= |
| 83 |
echo "ERROR: directory \"$OUTDIR\" doesn't exist and can't be created" |
echo "ERROR: directory \"$OUTDIR\" doesn't exist and can't be created" |
| 84 |
exit 1 |
exit 1 |
| 85 |
fi |
fi |
| 86 |
|
chgrp gcmpack $OUTDIR |
| 87 |
|
chmod 775 $OUTDIR |
| 88 |
fi |
fi |
| 89 |
|
|
| 90 |
echo "Using OUTDIR=\"$OUTDIR\"" |
echo "Using OUTDIR=\"$OUTDIR\"" |
| 129 |
while test -e $OUTDIR"/"$tdir"_"$ad ; do |
while test -e $OUTDIR"/"$tdir"_"$ad ; do |
| 130 |
ad=$(( $ad + 1 )) |
ad=$(( $ad + 1 )) |
| 131 |
done |
done |
| 132 |
mv $TEMPDIR"/"$tdir $OUTDIR"/"$tdir"_"$ad |
mv $TEMPDIR"/"$tdir $OUTDIR"/"$tdir"_"$ad > /dev/null 2>&1 |
| 133 |
chmod -R a+rx $OUTDIR"/"$tdir"_"$ad > /dev/null 2>&1 |
chmod -R a+rx $OUTDIR"/"$tdir"_"$ad > /dev/null 2>&1 |
| 134 |
gzip $OUTDIR"/"$tdir"_"$ad"/output.txt" |
# gzip $OUTDIR"/"$tdir"_"$ad"/output.txt" |
| 135 |
else |
else |
| 136 |
mv $TEMPDIR"/"$tdir $OUTDIR |
mv $TEMPDIR"/"$tdir $OUTDIR > /dev/null 2>&1 |
| 137 |
chmod -R a+rx $OUTDIR"/"$tdir > /dev/null 2>&1 |
chmod -R a+rx $OUTDIR"/"$tdir > /dev/null 2>&1 |
| 138 |
gzip $OUTDIR"/"$tdir"/output.txt" |
# gzip $OUTDIR"/"$tdir"/output.txt" |
| 139 |
fi |
fi |
| 140 |
|
|
| 141 |
# remove the original file |
# remove the original file |