diff options
Diffstat (limited to 'libraries/ocaml-findlib/doinst.sh')
-rw-r--r-- | libraries/ocaml-findlib/doinst.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libraries/ocaml-findlib/doinst.sh b/libraries/ocaml-findlib/doinst.sh new file mode 100644 index 0000000000000..e0013668ff066 --- /dev/null +++ b/libraries/ocaml-findlib/doinst.sh @@ -0,0 +1,17 @@ +#!/bin/sh +config() { + old="$1" + new="$old.new" + if [ ! -r $old ]; then + mv $new $old + elif [ "$(cat $old | md5sum)" = "$(cat $new | md5sum)" ]; then + rm $new + fi +} +config etc/findlib.conf + +destdir=$(ocamlfind printconf destdir)/stublibs +ldconf=$(ocamlfind printconf ldconf) +if ! grep -q $destdir $ldconf; then + echo $destdir >> $ldconf +fi |