DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Packaging your software applications

request script file

   # If <DELETE> is pressed, make sure we exit 77 so pkgadd knows
   # no packages were selected for installation.  In this case,
   # pkgadd will also not install the SIP itself.
   trap 'EXITCODE=77; exit' 2
   trap 'exit $EXITCODE' 0
   

while read pkginst parts default category package_name do echo $pkginst >>/tmp/order$$ if [ "$default" = "y" ] then echo $pkginst >>/tmp/req$$ else echo $pkginst >>/tmp/opt$$ fi done <$SETINFO

REQUIRED=`cat /tmp/req$$ 2>/dev/null` OPTIONAL=`cat /tmp/opt$$ 2>/dev/null` ORDER=`cat /tmp/order$$ 2>/dev/null` rm -f /tmp/opt$$ /tmp/req$$ /tmp/order$$ HELPMSG="Enter 'y' to run default set installation or enter 'n' to run custom set installation."

PROMPT="Do you want to run default set installation?"

ANS=`ckyorn -d y -p "$PROMPT" -h "$HELPMSG"`|| exit $?

if [ "$ANS" = "y" ] then # Default installation for PKG in $REQUIRED do PKGLIST="$PKGLIST $PKG" if [ -f $REQDIR/$PKG/response ] then cp $REQDIR/$PKG/response $RESPDIR/$PKG fi done echo "PKGLIST=$PKGLIST" >> $1 else # Custom installation of required packages for PKG in $REQUIRED do PKGLIST="$PKGLIST $PKG" if [ -f $REQDIR/$PKG/request ] then PROMPT="Do you want default installation for $PKG?" RANS=`ckyorn -d y -p "$PROMPT" -h "$HELPMSG"` || exit $? if [ "$RANS" = "y" ] then cp $REQDIR/$PKG/request $RESPDIR/$PKG else sh $REQDIR/$PKG/request $RESPDIR/$PKG fi fi done

# Select which optional packages in set are to be installed for PKG in $OPTIONAL do HELPMSG="Enter 'y' to install $PKG as part of this set installation or 'n' to skip installation." PROMPT="Do you want to install $PKG?" PANS=`ckyorn -d y -p "$PROMPT" -h "$HELPMSG"` || exit $?

if [ "$PANS" = "y" -o "$PANS" = "" ] then PKGLIST="$PKGLIST $PKG" if [ -f $REQDIR/$PKG/request ] then PROMPT="Do you want default installation for $PKG?" RANS=`ckyorn -d y -p "$PROMPT" -h "$HELPMSG"` || exit $? if [ "$RANS" = "y" ] then cp $REQDIR/$PKG/request $RESPDIR/$PKG else sh $REQDIR/$PKG/request $RESPDIR/$PKG fi fi fi done echo "PKGLIST=$PKGLIST" >> $1 fi

if [ "$PKGLIST" = "" ] then EXITCODE=77 fi export SETPKGS


Next topic: 7b. Split one set into two
Previous topic: preinstall script file

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003