From 2a1971bc3612904cc4b3cbca7a562e175535b054 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 4 May 2020 17:39:38 +0100 Subject: Fix up tesseract rules and add useful stuff for training --- roles/tesseractor/tasks/leptonica.yml | 3 --- roles/tesseractor/tasks/main.yml | 1 + roles/tesseractor/tasks/tesseract.yml | 7 ++----- roles/tesseractor/tasks/usefulbits.yml | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 roles/tesseractor/tasks/usefulbits.yml (limited to 'roles/tesseractor') diff --git a/roles/tesseractor/tasks/leptonica.yml b/roles/tesseractor/tasks/leptonica.yml index 9b07c9b..deee245 100644 --- a/roles/tesseractor/tasks/leptonica.yml +++ b/roles/tesseractor/tasks/leptonica.yml @@ -20,7 +20,6 @@ version: addinstall depth: 1 become: no - register: leptclone - name: Build leptonica command: make -f makefile.static {{ item }} @@ -30,11 +29,9 @@ - nodebug - SHARED=yes shared become: no - when: leptclone.changed - name: Install leptonica command: make -f makefile.static install args: chdir: /home/{{ ansible_user }}/src/leptonica/src - when: leptclone.changed notify: update ld.so diff --git a/roles/tesseractor/tasks/main.yml b/roles/tesseractor/tasks/main.yml index e406e2f..50bd106 100644 --- a/roles/tesseractor/tasks/main.yml +++ b/roles/tesseractor/tasks/main.yml @@ -3,3 +3,4 @@ - include: leptonica.yml - include: tesseract.yml - include: training.yml +- include: usefulbits.yml diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml index 56d8750..892782b 100644 --- a/roles/tesseractor/tasks/tesseract.yml +++ b/roles/tesseractor/tasks/tesseract.yml @@ -28,18 +28,15 @@ version: amibuild depth: 1 become: no - register: tessclone - name: Build tesseract and training tools command: make all training args: - chdir=/home/{{ ansible_user }}/src/tesseract/simplemake + chdir: /home/{{ ansible_user }}/src/tesseract/simplemake become: no - when: tessclone.changed - name: Install tesseract and training tools command: make install install-training args: - chdir=/home/{{ ansible_user }}/src/tesseract/simplemake - when: tessclone.changed + chdir: /home/{{ ansible_user }}/src/tesseract/simplemake notify: update ld.so diff --git a/roles/tesseractor/tasks/usefulbits.yml b/roles/tesseractor/tasks/usefulbits.yml new file mode 100644 index 0000000..a0e5f54 --- /dev/null +++ b/roles/tesseractor/tasks/usefulbits.yml @@ -0,0 +1,15 @@ +--- +- name: Install useful dependencies + apt: + state: present + name: + - git + +- name: Clone useful repositories + git: + repo: "{{ item.url }}" + dest: "/home/{{ ansible_user }}/{{ item.name }}" + become: no + with_items: + - { url: "https://git.rescribe.xyz/sh", name: "sh" } + - { url: "https://git.rescribe.xyz/ground-truth", name: "ground-truth" } -- cgit v1.2.1-24-ge1ad