4 executable_p
() { command -v "$1" >/dev
/null
2>&1; }
5 die
() { echo "$1" >&2; exit 1; }
7 if executable_p wget
; then dl
() { wget
-q $1 -O $2; }
8 elif executable_p curl
; then dl
() { curl
$1 -o $2; }
9 else die
"no program to fetch remote urls found"
16 xz
=http
://caml.inria.fr
/pub
/distrib
/ocaml-4.06
/ocaml-4.06
.1.
tar.xz
17 test -e ocaml-4.06
.1.
tar.xz || dl
$xz ocaml-4.06
.0.1.xz
18 tar xf ocaml-4.06
.0.1.xz
20 .
/configure
-prefix $prefix
27 rmudir
=$HOME/x
/rcs
/git
/mupdf
28 test -e $rmudir || ref
= && ref
="--reference $rmudir"
30 git clone
--recursive $ref git
://git.ghostscript.com
/mupdf.git
36 make -C mupdf build
=native
-j4 libs
39 test -e llpp || git clone git
://repo.or.cz
/llpp.git
&& {
44 ln -sf $PWD/mupdf llpp
46 PATH
=$prefix/bin
:$PATH sh .
/build.sh build