Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: djm-parl
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 54 lines (51 sloc) 1.679 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
#!/bin/sh
#
# ${RHOME}/tools/GETVERSION

TOOLS_DIR=`echo ${0} | sed 's%/[^/][^/]*$%%'`
(
  maj=`sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\1/' < ${TOOLS_DIR}/../VERSION`
  min=`sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\2/' < ${TOOLS_DIR}/../VERSION`
  rev=`sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\3/' < ${TOOLS_DIR}/../VERSION`
  pl=`echo ${min} | sed 's/\..*//'`
  sl=`echo ${min} | sed 's/.*\.//'`
  ver=`expr ${maj} \\* 65536 + ${pl} \\* 256 + ${sl}`
  if test -f ../../SVN-REVISION ; then
dat=`sed -e 1d -e 's/^Last Changed Date: //' ../../SVN-REVISION`
    y=`echo ${dat} | cut -d- -f1`
    m=`echo ${dat} | cut -d- -f2`
    d=`echo ${dat} | cut -d- -f3`
    y1=`expr ${y} - 2000`
    svn_rev=`sed -n -e 's/^Revision: //' -e '1p' < ../../SVN-REVISION`
  else
y=2006
    m=01
    d=01
    y1=6
    svn_rev=unknown
  fi
echo "/* Rversion.h. Generated automatically. */"
  echo "#ifndef R_VERSION_H"
  echo "#define R_VERSION_H"
  echo
echo '#ifdef __cplusplus'
  echo 'extern "C" {'
  echo '#endif'
  echo
echo "#define R_VERSION ${ver}"
  echo "#define R_Version(v,p,s) (((v) * 65536) + ((p) * 256) + (s))"
  echo "#define R_MAJOR \"${maj}\""
  echo "#define R_MINOR \"${min}\""
  echo "#define R_STATUS \"${rev}\""
  echo "#define R_YEAR \"${y}\""
  echo "#define R_MONTH \"${m}\""
  echo "#define R_DAY \"${d}\""
  echo "#define R_SVN_REVISION \"${svn_rev}\""
## Using 1-digit year stops problems with leading zeros
# echo "#define R_FILEVERSION ${maj},${pl}${sl},${y1}${m}${d},0"
  echo "#define R_FILEVERSION ${maj},${pl}${sl},${svn_rev},0"
  echo
echo '#ifdef __cplusplus'
  echo '}'
  echo '#endif'
  echo
echo "#endif /* not R_VERSION_H */")
    
Something went wrong with that request. Please try again.