home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / contrib / scripts / check_TextConf_version next >
Encoding:
Text File  |  1996-03-18  |  1.7 KB  |  48 lines

  1. #!/bin/sh
  2. #
  3. # syntax: checkTextConf_version <configfile> <version_string>
  4. #
  5. # check if TextConfig file version is older than <version_string>
  6. # This is used by the Makefile
  7.  
  8. if [ "$1" = "" -o "$2" = "" ]; then
  9.     echo "Missing parameter. Correct syntax is:"
  10.     echo "$0 <configfile> <version_string>"
  11.     echo "      <configfile> is the full path to the TextConfig file."
  12.     echo "      <version_string> is of the form \"1.2.3\""
  13.     exit 1
  14. fi
  15.  
  16. TextConfV=$(fgrep "#@stm_version_number@" $1 | awk -F "." "{ print \$2*1000000+\$3*1000+\$4 }")
  17. ReqV=$(echo $2 | awk -F "." "{ print \$1*1000000+\$2*1000+\$3 }")
  18. #echo "TextConfVer: $TextConfV"
  19. #echo "ReqV:        $ReqV"
  20.  
  21. if [ "$TextConfV" = "" ]; then
  22.     echo "WARNING:"
  23.     echo "    The TextConfig file currently installed in $1 is"
  24.     echo "    from an old version of SVGATextMode."
  25.     echo "    You MUST upgrade it to a newer TextConfig file."
  26.     echo "    The version installed now is INCOMPATIBLE with the new version"
  27.     echo "    of SVGATextMode you installed."
  28.     echo
  29.     echo "    The most important syntax changes are:"
  30.     echo "       - ALL strings must be enclosed in double quotes"
  31.     echo "        (this was not required in pre 1.2 versions)"
  32.     echo "      - The "FontSelect" line syntax has changed."
  33.     echo
  34.     echo "    You will get an error similar to the following when"
  35.     echo "    NOT upgrading or editing the TextConfig file:"
  36.     echo "        stm: ERROR: Unknown token on line 788 of config file"
  37.     exit 0
  38. fi
  39.  
  40. if [ $[ $TextConfV >= $ReqV ] = 0 ]; then
  41.     echo "The TextConfig file currently installed in $1 is from a previous"
  42.     echo "version of SVGATextMode. You might consider upgrading it with a"
  43.     echo "newer TextConfig file, so you can use the new modes and/or features"
  44.     echo "in it (if any). This is _not_ required however."
  45. fi
  46.  
  47.  
  48.