#! /bin/sh
# 
#  shrink
#
SAVEDIR=/opt/saveall        # use the default directory
SAVELOG=$SAVEDIR/saveall_log
cd /opt/fox/ciocfg/api
for x in `cat /etc/cplns`
do
    echo OPEN $x MODIFY byAC >  /opt/ac/$x.shrink
    echo SHRINK              >> /opt/ac/$x.shrink
    echo CLOSE               >> /opt/ac/$x.shrink
    echo EXIT                >> /opt/ac/$x.shrink
    echo "`date` --- shrinking $x" >> $SAVELOG
    ./iccdrvr.tsk -i /opt/ac/$x.shrink -o /opt/ac/$x.log -n ECHO
    cat /opt/ac/$x.log >> $SAVELOG
    rm /opt/ac/$x.shrink /opt/ac/$x.log 2> /dev/null
done
