Skip to content

Commit

Permalink
test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
louisradtke committed Jan 26, 2025
1 parent 6c3b520 commit 9146998
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .latexmkrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

$pdflatex = 'pdflatex';

system("echo \"\\newcommand{\\gitcommit}[0]{\$(git rev-parse --short HEAD | tr -d '\n')}\" > variables.tex");
system("echo \"\\newcommand{\\giturl}[0]{https://github.com/louisradtke/cv/tree/\$(git rev-parse --short HEAD | tr -d '\n')}\" >> variables.tex");
system("bash collect_git.sh");
7 changes: 7 additions & 0 deletions collect_git.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# shellcheck disable=SC2028
echo "\\newcommand{\\gitcommit}[0]{$(git rev-parse --short HEAD)}" > variables.tex

# shellcheck disable=SC2028
echo "\\newcommand{\\giturl}[0]{https://github.com/louisradtke/cv/tree/$(git rev-parse --short HEAD)}" >> variables.tex
2 changes: 1 addition & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

\newcommand{\col}[2]{\textcolor[HTML]{#1}{#2}}
\newcommand{\badge}[1]{\tcbox[on line,size=small,nobeforeafter,fontupper={\strut},bottom=-0.75mm]{\textbf{#1}}}
\input{variables.tex}
\input{variables.tex} % include GitHub URL and commit string

\begin{document}

Expand Down

0 comments on commit 9146998

Please sign in to comment.