home *** CD-ROM | disk | FTP | other *** search
/ O2 Marketing & Sales Demos / o2_marketing_demos_96.iso / O2_Demos / egghead / RUN < prev    next >
Encoding:
Text File  |  1996-09-28  |  1.3 KB  |  74 lines

  1. #!/bin/csh -f
  2.  
  3. cd /usr/demos/General_Demos/egghead/bin
  4.  
  5. setenv DISPLAY localhost:0.0
  6. setenv HOME /tmp
  7.  
  8. onintr INTERRUPT
  9.  
  10. # Setup sound 
  11. set SOUNDADF =
  12. set ans = "YES"
  13.  
  14. switch ("$ans")
  15.   case "YES":
  16.       set tmpfile = "$HOME/.eeGGgg.tmp"
  17.       set lc = `ps -ef | grep awd > $tmpfile; wc -l $tmpfile`
  18.       if ( $lc[1] != 3 ) then 
  19.         ./awd 
  20.       endif
  21.       set SOUNDADF = "-s sound.adf"
  22.       breaksw
  23.  
  24.   case "ABORT":
  25.       goto ABORT
  26.       breaksw
  27. endsw
  28.  
  29.  
  30. # Setup the default execution environment for egghead
  31.  
  32. setenv DHOST `uname -n`
  33.  
  34.  
  35. # STEREO CHECK
  36. set stereo = "NO"
  37.  
  38. switch ("$stereo")
  39.   case "YES":
  40.  
  41.     # Stereo mode/setmon should be done globally, not locally!
  42.  
  43.     # su  root -c "/usr/gfx/setmon -x 960x680_108s; /usr/gfx/stopgfx; /usr/gfx/startgfx &"
  44.  
  45.     ./ski -b $SOUNDADF vega_stereo.adf
  46.  
  47.     #  xconfirm -t "Remember to reset vof as root: setenv DISPLAY :0.0; /usr/gfx/setmon -x 60HZ; /usr/gfx/stopgfx; /usr/gfx/startgfx &"
  48.  
  49.     # su  root -c "/usr/gfx/setmon -x 60HZ; /usr/gfx/stopgfx; /usr/gfx/startgfx &"
  50.   breaksw
  51.  
  52.   case "NO":
  53.     ./ski -b $SOUNDADF vega.adf
  54.   breaksw
  55.  
  56.   case "ABORT":
  57.     goto ABORT
  58.   breaksw
  59.  
  60. endsw
  61.  
  62.   ipcrm -M 0x12345
  63.   exit 0
  64.  
  65. INTERRUPT:
  66.   killall ski ski-g
  67.   ipcrm -M 0x12345
  68.  
  69. ABORT:
  70.   echo "User aborted Egghead demo"
  71.   killall xconfirm
  72.   exit 0
  73.  
  74.