radare2/sys/ldconfig.sh
kmartin36 5c480054a2 Don't run ldconfig when installing into /usr (#15049) ##build
It seems that commit 7e5f1f5851 attempted to prevent /etc/ld.so.conf.d/radare.conf from being added and ldconfig from being necessary when the user installs into /usr instead of /usr/local. This patch achieves that behaviour.
2019-09-16 09:40:20 +02:00

16 lines
334 B
Bash
Executable File

#!/bin/sh
LD=/etc/ld.so.conf.d
if test -w $LD ; then
if type ldconfig > /dev/null 2>&1 ; then
mkdir -p $LD
P=$(awk -F= '/^LIBDIR/{print $2}' config-user.mk)
D="$(dirname "$P")"
if [ /usr != "$D" ]; then
echo "$P" > "$LD/radare.conf"
# do not update symlinks to avoid r2 install issues
ldconfig -X
fi
fi
fi
exit 0