Read paper color from config
[llpp.git] / misc / getmupdf.sh
blobe7fd321c482dd7338df89484fd7a92e87e4d3d79
1 #!/bin/sh
2 set -eu
4 MUPDF_OUTPUT_DIR="$1"
5 MUPDF_URL="https://github.com/ArtifexSoftware/mupdf"
6 MUPDF_DESIRED_VERSION="43d28089c35d39ca6f858a44c77b3ba9005b5687"
8 if [ ! -d ${MUPDF_OUTPUT_DIR} ]; then
9 echo "mupdf does not exist, fetching it from ${MUPDF_URL}"
10 git clone ${cloneargs-} ${MUPDF_URL} --recursive ${MUPDF_OUTPUT_DIR}
13 cd ${MUPDF_OUTPUT_DIR}
14 git remote update
15 MUPDF_VERSION=$(git rev-parse HEAD)
17 test "${MUPDF_VERSION}" = "${MUPDF_DESIRED_VERSION}" || {
18 printf "mupdf current version is ${MUPDF_VERSION} "
19 echo "switching to ${MUPDF_DESIRED_VERSION}"
20 git reset --hard ${MUPDF_DESIRED_VERSION}
21 git submodule update --init --recursive