home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 2 / hotmix_v02.iso / Intro / start.flag < prev    next >
Text File  |  1992-10-16  |  1KB  |  52 lines

  1. #! /bin/sh 
  2. #
  3. #    added code to place new showcase window in place depending on 
  4. #    what type of graphics hardware the user has.
  5. #
  6. #                [ Fri Oct  2 14:26:15 1992 nlouie ]
  7. #
  8. #       start.flag
  9. #
  10. #       This script stops showcase from displaying any other flag
  11. #       screens that were started with the start.flag script.
  12. #       It then starts showcase in the foreground, view-only, full-color
  13. #       mode (fvb) with the flag file ($1) as input. 
  14. #
  15. #       To run the script, type: start.flag flagfile
  16. #       (where flagfile is a file in the ../flags directory)
  17. #
  18. #       The last 2 lines
  19. #       capture the process id (PID) of this instance of showcase, store
  20. #       the PID in a file (/tmp/.endflag), and make this file a shell script.
  21. #       This way you can stop this particular instance of showcase
  22. #       with the shell script end.flag, which just executes the
  23. #       /tmp/.endflag file.
  24. #
  25.  
  26. #end.flag
  27. # the following is the startups for the truecolor displays:
  28. CDDISPTYPE='none'; export CDDISPTYPE
  29. cd $HOTMIXDIR/Intro
  30.  
  31. # set the display type based on the graphics card.
  32.  
  33. hinv | grep GR2 > /usr/tmp/cdgrep
  34.  
  35. if [  -s /usr/tmp/cdgrep ]; then
  36.         CDDISPTYPE='TRUEC'
  37.         export CDDISPTYPE
  38. else
  39.         CDDISPTYPE="PSEUDO"
  40.         export CDDISPTYPE
  41. fi
  42.  
  43. /bin/rm /usr/tmp/cdgrep
  44.  
  45. if [ $CDDISPTYPE = "TRUEC" ]; then
  46.     showcase -fbv -S532,200,1091,544 ./$1 &
  47. else
  48.     showcase -fbv -S270,167,828,509 ./$1 &
  49. fi
  50.  
  51. echo kill $child > /tmp/.endflag && chmod 755 /tmp/.endflag
  52.