45 lines
724 B
Bash
Executable File
45 lines
724 B
Bash
Executable File
#! /bin/ksh
|
|
|
|
charts="$1"
|
|
if [ "x$charts" = "x" ]; then
|
|
charts="charts"
|
|
else
|
|
shift
|
|
fi
|
|
|
|
dirs="$*"
|
|
if [ "x$dirs" = "x" ]; then
|
|
dirs="ip*"
|
|
|
|
# ack!
|
|
dirs1="ip25"
|
|
dirs2="ip27"
|
|
else
|
|
dirs1="$1"; shift
|
|
dirs2="$1"
|
|
|
|
if [ "x$dirs2" = "x" ]; then
|
|
echo "Only one directory specified to gen_composite!"
|
|
echo "Bailing out..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
tmpleft=/tmp/left-$$.ppm
|
|
tmpright=/tmp/right-$$.ppm
|
|
|
|
echo Generating composite images...
|
|
|
|
for x in $charts/$dirs1*.gif
|
|
do
|
|
suffix=${x##$charts/$dirs1}
|
|
|
|
giftopnm $x | pnmscale -xsize 700 > $tmpleft
|
|
giftopnm $charts/${dirs2}${suffix} | pnmscale -xsize 700 > $tmpright
|
|
|
|
pnmcat -lr $tmpleft $tmpright | ppmquant 255 | \
|
|
ppmtogif > $charts/cmp_$suffix
|
|
|
|
rm -f $tmpleft $tmpright
|
|
done
|