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

  1. #!/bin/csh -f
  2.  
  3. setenv XUSERFILESEARCHPATH "/usr/lib/X11/app-defaults/%N"
  4. set MYAPP=rapidapp
  5. set CD_PATH=$DMTOOLSDIR/demos/RapidApp
  6. set KBYTES_REQ=9856
  7. set INST_DIR=RapidApp
  8.     if (`/sbin/uname -r | cut -c1,3` <= 52) then
  9.     echo "You must be running an operating system of 5.3 or"
  10.     echo "greater to install this demo"
  11.     echo "...exiting"
  12.     echo " "
  13.         echo "Press Enter to exit this window...  \c"
  14.         set a = $<
  15.         exit
  16.  
  17.     else
  18.     endif
  19.  
  20. endif
  21.  
  22. if ( `versions RapidApp | grep RapidApp | wc -l` > 0 ) then
  23.         echo "It appears that RapidApp is already installed."
  24.     echo "Would you like to install it anyway (y/n)   \c"
  25.         set ans=($<)
  26.                 if ( $ans != 'y' ) then
  27.                 echo "Bye..."
  28.                         echo "Press Enter to exit this window...  \c"
  29.                         set a = $<
  30.                         exit
  31.         endif
  32. endif
  33.  
  34. set TEST_NEW=`df -k /usr | /usr/bin/awk '{print $7}'`
  35.  
  36. if ( "$TEST_NEW" == "Mounted /" ) then
  37.    set FILE_STRUCTURE=new
  38. else
  39.    set FILE_STRUCTURE=old
  40. endif
  41.  
  42. if ( $KBYTES_REQ < 1000 ) then
  43.     set MBYTES_REQ=1
  44. else
  45.     @ MBYTES_REQ = ($KBYTES_REQ) / 1000
  46. endif
  47.  
  48. if ( $FILE_STRUCTURE == "new" ) then
  49.    set KBYTES_AVAIL=`df -k / | /bin/grep / | /usr/bin/awk '{print $5}'`
  50. else
  51.    set KBYTES_AVAIL=`df -k /usr | /bin/grep /usr | /usr/bin/awk '{print $5}'`
  52. endif
  53.  
  54.     if ( $KBYTES_AVAIL < $KBYTES_REQ ) then
  55.         echo "This demo requires $MBYTES_REQ Mbytes of disk space."
  56.         echo "You do not have enough space to install RapidApp."
  57.         echo "Exiting..."
  58.         echo "Bye."
  59.         sleep 3
  60.     echo "Press Enter to exit this window...  \c"
  61.     set a = $<
  62.         exit
  63.  
  64.  
  65.      else
  66.         echo " "
  67.         echo "This demo requires $MBYTES_REQ Mbytes of disk space."
  68.         echo "RapidApp will be installed in a directory named /usr/sbin."
  69.         echo "Continue (y/n)?  \c"
  70.         set ans=($<)
  71.         if ( $ans != 'y' ) then
  72.             echo " "
  73.                         echo "... Bye."
  74.                         sleep 3
  75.                         exit
  76.                         endif
  77.         else
  78.                 echo " "
  79.         endif
  80.     endif
  81.  
  82. echo " "
  83. echo "Installing RapidApp.  Please wait..."
  84.  
  85. echo " "
  86. echo " "
  87. echo " "
  88. echo "To install RapidApp, at the inst prompt type; go <enter>" 
  89. echo "When installation has completed type; quit <enter> "
  90. echo " "
  91. echo "If you have problems with the installation try; step <enter>"
  92. echo "And resolve any conflicts that may exist. "
  93.  
  94.     cd $CD_PATH
  95.         inst -f .
  96.                 echo " "
  97.                 echo "Done."
  98.                 echo ""
  99.         echo ""
  100.             echo "Do you want to get a temporary license now (y/n)?  \c"
  101.                 set ans=($<)
  102.                 if ( $ans == 'y') then
  103.                         rehash
  104.                         cd
  105.                         jot -fv $DMTOOLSDIR/demos/keyra
  106.                            if ( `versions netls_eoe | grep "netls_eoe.sw.netls_eoe" | wc -l` == 0 ) then
  107.                                 echo "It appears that netls is not currently installed on this machine."
  108.                                 echo "You will need to install netls_eoe to properly install"
  109.                                 echo "your temporary licenses."
  110.                            endif
  111.                 echo ""
  112.                                 echo "Note: You will need to install the license keys"
  113.                                 echo "before you can run the demos."
  114.                 echo ""
  115.                 echo ""
  116.                 endif
  117.                 echo "To view the temporary license later,"
  118.                 echo "move to $DMTOOLSDIR/demos directory"
  119.                 echo "and type;"
  120.                 echo "jot ./keyra"
  121.                 echo ""
  122.                 echo ""
  123.  
  124.  
  125. echo "Would you like to run the demo now (y/n)?   \c"
  126.     set ans=($<)
  127.         if ( $ans != 'y' ) then
  128.                 echo "Bye..."
  129.         echo "Press Enter to exit this window...  \c"
  130.         set a = $<
  131.         exit
  132.  
  133.         else             
  134.                 cd 
  135.         rehash
  136.  
  137.         /usr/bin/X11/xconfirm -icon info \
  138.         -t " " \
  139.         -t "For some extra help, check out the on-line tutorial\!" \
  140.         -t " " \
  141.         -b Ok
  142.  
  143.         /usr/sbin/rapidapp
  144.     endif
  145. else
  146.         echo "There is not enough disk space available to install the demo."
  147. endif
  148.  
  149. echo "Press Enter to exit this window...  \c"
  150. set a = $<
  151. exit
  152.