summaryrefslogtreecommitdiffstats
path: root/libraries/ocaml-findlib/doinst.sh
blob: e0013668ff0667c431d47efeae9656ed928aa88d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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