slackbuilds_ponce/libraries/ocaml-findlib/doinst.sh
Jockey S. Kyd 213a57385a libraries/ocaml-findlib: Added (OCaml library manager)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2012-05-07 12:18:08 -05:00

17 lines
351 B
Bash

#!/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