blob: fcce56473ea2596fdeb8792bd7b462ba831fca89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
}
config etc/findlib.conf.new
destdir=$(chroot . /usr/bin/ocamlfind printconf destdir)/stublibs
ldconf=$(chroot . /usr/bin/ocamlfind printconf ldconf)
if ! grep -q -s "${destdir##/}" "$ldconf"; then
echo "$destdir" >> "${ldconf##/}"
fi
|