resume/tex/Shell.tex

6 lines
250 B
TeX
Raw Normal View History

2023-07-31 04:30:43 +03:00
% \GetEnv[\HOME]{HOME} % Example: Store $HOME shell var into \HOME cmd.
\usepackage{catchfile}
\newcommand{\GetEnv}[2][]{%
\CatchFileEdef{\Temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\Temp\else\let#1\Temp\fi}