#!/bin/sh g="/home/{{ ansible_user }}/src/go" t="/home/{{ ansible_user }}/trainings" # The extra go install step ensures that go modules are used # (they don't work for the go get stage in go 1.11) export GOPATH="$g" cd "$g/src/rescribe.xyz/bookpipeline" && \ git pull && \ GO111MODULE=on go install ./... && \ sudo cp "$g/bin/bookpipeline" /usr/local/bin/ || exit 1 cd "$t" && git pull && \ sudo cp "$t"/* /usr/local/share/tesseract-ocr/tessdata/