version-and-copyright.sty 415 B

1234567891011121314
  1. \ProvidesPackage{version-and-copyright}[2020/02/02 Handle Version and Copyright]
  2. \RequirePackage{verbatim}
  3. \RequirePackage{shellesc}
  4. \RequirePackage{etoolbox}
  5. \ProcessOptions\relax
  6. \newcommand\vc@getRev{\ShellEscape{git rev-parse --short HEAD > \jobname.ver}}
  7. \newcommand\gitrevision{\vc@getRev\input{\jobname.ver}}
  8. \newcommand\copyrightRange[1]{\copyright~#1\ifnumgreater{\year}{#1}{--\the\year}{}}
  9. \endinput