home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / make-resources < prev    next >
Encoding:
Text File  |  1998-04-08  |  1.8 KB  |  75 lines

  1. #! /bin/sh
  2. #
  3. # The contents of this file are subject to the Netscape Public License
  4. # Version 1.0 (the "NPL"); you may not use this file except in
  5. # compliance with the NPL.  You may obtain a copy of the NPL at
  6. # http://www.mozilla.org/NPL/
  7. #
  8. # Software distributed under the NPL is distributed on an "AS IS" basis,
  9. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10. # for the specific language governing rights and limitations under the
  11. # NPL.
  12. #
  13. # The Initial Developer of this code under the NPL is Netscape
  14. # Communications Corporation.  Portions created by Netscape are
  15. # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16. # Reserved.
  17. #
  18.  
  19. DEST=$1; shift
  20. NAME=$1; shift
  21. CLASS=$1; shift
  22. VSUFFIX=$1; shift
  23. SS=$1; shift
  24. LOCALE_MAP=$1
  25.  
  26. if test $# -eq 2
  27. then
  28.     shift
  29.     MAIL_IM_HACK=$1; shift
  30.     NEWS_IM_HACK=$1; shift
  31. else
  32.     MAIL_IM_HACK=""
  33.     NEWS_IM_HACK=""
  34. fi
  35.  
  36. PROGNAME="mozilla"
  37.  
  38. echo "Generating ${DEST} from resources..."
  39.  
  40. VN=`sed -n 's/^#define VERSION_NUMBER *\(.*\)$/\1/p' versionn.h`
  41. VERS=`echo ${VN}${VSUFFIX}`
  42.  
  43. SGIP=`echo ${DEST} | sed -n 's/.*IRIX.*/TRUE/p'`
  44. if [ "x${SGIP}" = "xTRUE" ]; then
  45.     NOTSGI="!"
  46.     ONLYSGI=""
  47. else
  48.     NOTSGI=""
  49.     ONLYSGI="!"
  50. fi
  51.  
  52. SCOP=`echo ${DEST} | sed -n 's/.*SCO.*/TRUE/p'`
  53. if [ "x${SCOP}" = "xTRUE" ]; then
  54.     ONLYSCO=""
  55. else
  56.     ONLYSCO="!"
  57. fi
  58.  
  59. rm -f ${DEST}
  60. cat resources ${LOCALE_MAP} strs | sed \
  61.     "s/@NAME@/${NAME}/g;
  62.      s/@CLASS@/${CLASS}/g;
  63.      s/@PROGNAME@/${PROGNAME}/g;
  64.      s/@VERSION@/${VERS}/g;
  65.      s/@NOTSGI@/${NOTSGI}/g;
  66.      s/@ONLYSGI@/${ONLYSGI}/g;
  67.      s/@ONLYSCO@/${ONLYSCO}/g;
  68.      s/@LOC@//g;
  69.      s/@LTD@//g;
  70.      s:@LIBDIR@:${LOC_LIB_DIR}:g;
  71.      s/@MAIL_IM_HACK@/${MAIL_IM_HACK}/g;
  72.      s/@NEWS_IM_HACK@/${NEWS_IM_HACK}/g;
  73.      s/@URLVERSION@/${VERS}/g" > ${DEST}
  74.  
  75.