neo2.yml 1.29 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
---
2 3 4
- name: create destination directories
  become: yes
  file:
5
    path: "{{ texpath }}/{{ item }}/latex/uniinput"
6 7 8 9 10 11 12
    state: directory
    mode: 0755
  with_items:
  - tex
  - doc
  register: uniinputdir

julian.gethmann's avatar
julian.gethmann committed
13
- name: download uniinput
14 15 16
  get_url:
    url: "{{ item }}"
    dest: /tmp
julian.gethmann's avatar
julian.gethmann committed
17 18 19
  with_items:
  - "http://wiki.neo-layout.org/export/HEAD/latex/Standard-LaTeX/uniinput.dtx"
  - "http://wiki.neo-layout.org/export/HEAD/latex/Standard-LaTeX/uniinput.ins"
20
  when: uniinputdir.changed
julian.gethmann's avatar
julian.gethmann committed
21 22

- name: compile package docu
23 24 25
  command: pdflatex -interaction=nonstopmode uniinput.dtx
  args:
    chdir: /tmp
26
    creates: /tmp/uniinput.pdf
julian.gethmann's avatar
julian.gethmann committed
27
  ignore_errors: yes
28 29
  when: uniinputdir.changed
  register: pdf_file
julian.gethmann's avatar
julian.gethmann committed
30 31

- name: compile package
32 33 34 35
  command: latex uniinput.ins
  args:
    chdir: /tmp
    creates: /tmp/uniinput.sty
36 37
  when: uniinputdir.changed
  register: sty_file
julian.gethmann's avatar
julian.gethmann committed
38 39 40

- name: move style to LaTeX dir
  become: yes
41 42
  copy:
    src: /tmp/uniinput.sty
43
    dest: "{{ texpath }}/tex/latex/uniinput/uniinput.sty"
44
    remote_src: yes
julian.gethmann's avatar
julian.gethmann committed
45
  notify: update latex
46
  when: sty_file is defined and sty_file.changed
julian.gethmann's avatar
julian.gethmann committed
47 48 49

- name: move docu to LaTeX dir
  become: yes
50
  copy:
51
    src: /tmp/uniinput.pdf
52
    dest: "{{ texpath }}/doc/latex/uniinput/uniinput.pdf"
53
    remote_src: yes
julian.gethmann's avatar
julian.gethmann committed
54
  notify: update latex
55
  when: pdf_file is defined and pdf_file.changed