resume/tex/Shell.tex
2024-10-12 23:30:08 +03:00

6 lines
250 B
TeX

% \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}