From 8d077c14eac23e7a823f2cfe4f0f7100451ab794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:14:16 +0200 Subject: [PATCH] dependencies installed on a script --- .gitlab-ci.yml | 9 ++------- genfiles.el | 4 +++- installs.sh | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100755 installs.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162edc2..c03d630 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,18 +2,13 @@ image: najeraoscar/latex-emacs-min test: script: - - apt-get update && apt install -y wget git - - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - - dpkg -i hugo*.deb - - hugo version - - git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV - - emacs --batch --load /tmp/install-org.el + - ./installs.sh - emacs --batch -Q --script genfiles.el - - cd org-cv-exports; latex -pdf altacv.org.tex - cd doc; hugo except: - master artifacts: paths: + - org-cv-exports - doc/public diff --git a/genfiles.el b/genfiles.el index ae82f3a..970bc61 100644 --- a/genfiles.el +++ b/genfiles.el @@ -25,8 +25,10 @@ (find-file workfile) (org-mode) (org-export-to-file 'altacv outfile) - (shell-command (format "latexmk -pdf %s" outfile)) + (shell-command (format "pdflatex %s" outfile)) + (copy-file (concat file ".pdf") cwd) )) (export-latex "altacv.org") +(export-latex "moderncv.org") (copy-directory workdir cwd) diff --git a/installs.sh b/installs.sh new file mode 100755 index 0000000..ef38fc4 --- /dev/null +++ b/installs.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb +dpkg -i hugo*.deb +hugo version + +# Latex +apt-get update && apt install -y fonts-font-awesome +git clone https://github.com/Titan-C/AltaCV.git /root/texmf-dist/tex/latex/AltaCV +wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty +wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-generic.tex +wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-pdftex.tex + +emacs --batch --load /tmp/install-org.el +cd org-cv-exports; latex -pdf altacv.org.tex