Use OCaml 4.14.0 RC1
[llpp.git] / misc / getmupdf.sh
blob29cb0ee9e4a8de84d58821e5251671f3ba8c2c2c
1 #!/bin/sh
2 set -eu
4 MUPDF_OUTPUT_DIR="$1"
5 u="git://git.ghostscript.com/mupdf"
6 #u="https://github.com/ArtifexSoftware/mupdf"
7 MUPDF_URL="${2-$u}"
8 MUPDF_DESIRED_VERSION="f6ddaf30da1defe3be961f1172b83554bc6f6b48"
10 if [ ! -d ${MUPDF_OUTPUT_DIR} ]; then
11 echo "mupdf does not exist, fetching it from ${MUPDF_URL}"
12 git clone ${cloneargs-} ${MUPDF_URL} --recursive ${MUPDF_OUTPUT_DIR}
15 cd ${MUPDF_OUTPUT_DIR}
16 git remote update
17 MUPDF_VERSION=$(git rev-parse HEAD)
19 test "${MUPDF_VERSION}" = "${MUPDF_DESIRED_VERSION}" || {
20 printf "mupdf current version is ${MUPDF_VERSION} "
21 echo "switching to ${MUPDF_DESIRED_VERSION}"
22 git reset --hard ${MUPDF_DESIRED_VERSION}
23 git submodule update --init --recursive