home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 12 / Silicon_Graphics_Developer_Magic_Soft_Dev_812-8101-012.iso / .all / demos / netscape / InstallIt2 < prev    next >
Encoding:
Text File  |  1995-11-10  |  2.2 KB  |  72 lines

  1. #!/bin/csh -f
  2. set APP_NAME=Netscape 
  3. set PGM_NAME=netscape 
  4. set INST_PATH=/usr/bin/X11/netscape
  5. set KBYTES_REQ=8000 
  6. if ( $KBYTES_REQ < 1000 ) then
  7.         set MBYTES_REQ=1 
  8.     else
  9.         @ MBYTES_REQ = ($KBYTES_REQ) / 1000 
  10.     endif 
  11.     set KBYTES_AVAIL=`df -k /usr | tail -1 | /usr/bin/awk '{print $5}'` 
  12. echo "The demo requires $MBYTES_REQ Mbytes of disk space."  
  13. echo " "  
  14.     if ( $KBYTES_AVAIL > $KBYTES_REQ ) then
  15.         echo "It will be installed in a directory named $INST_PATH."
  16.         echo "Continue with installation (y/n)?  \c"
  17.         set ans=($<)
  18.         if ( $ans != 'y' ) then
  19.                 echo " "
  20.                 echo "... Bye."
  21.                 sleep 2
  22.                 exit
  23.         endif
  24.         echo " "
  25.         echo "At the 'Inst>' prompt, type 'go' and press 'enter'."
  26.         echo "When installation is complete, type 'quit' and press 'enter'."
  27.         echo " "
  28.     cd $HOTMIXDIR/demos/netscape/dist
  29.     /usr/sbin/swmgr -V background:false -V custom_startup_mode:always -f ./netscape
  30. INSTALLCHK:
  31.         if ( `versions netscape | grep "Netscape" | wc -l` > 0 ) then
  32.                 echo " "
  33.                 echo "Done."
  34.                 echo " "
  35.                 echo "To run the demo, move to the $INST_PATH directory"
  36.                 echo "and execute $PGM_NAME."
  37.                 echo "View the README and relnotes files for documentation and"
  38.                 echo "execution details."
  39.                 echo " "
  40.                 echo " "
  41.                 echo "Do you want to run the demo now (y/n)?  \c"
  42.                 set ans=($<)
  43.                 if ( $ans == 'y') then
  44.             rehash
  45.                         cd
  46.                         netscape 
  47.             echo "Press Enter to exit this window...  \c"
  48.             set a = $<
  49.                         exit
  50.                 endif
  51.                 #endif
  52.         else
  53.                 echo " "
  54.                 echo "Netscape was not installed properly,"
  55.                 echo "Try again (y/n)?  \c"
  56.             set ans=($<)
  57.                     if ( $ans == 'y') then
  58.             cd $HOTMIXDIR/demos/netscape/dist
  59.             /usr/sbin/inst -f .
  60.             goto INSTALLCHK
  61.         endif    
  62.  
  63.                 echo " "
  64.         endif 
  65. else
  66.         echo "There is not enough disk space available to install the demo."  
  67. endif 
  68. echo " "  
  69. echo "Press Enter to exit this window...  \c"
  70. set a = $<
  71.  
  72.