<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 11, 2020 at 7:08 PM Cristian Ionescu-Idbohrn via subsurface <<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Debian unstable here.<br>
<br>
I did not have libgit2-dev installed and noticed this in build.log:<br>
<br>
./subsurface/scripts/build.sh: line 268: ldconfig: command not found<br>
realpath: missing operand<br>
Try 'realpath --help' for more information.<br>
<br>
That's because ldconfig is installed in /sbin/ldconfig and a non-root <br>
user does not normally have access to /sbin. Thus the detection will <br>
always fail. So, some sort of detection would be needed. Something <br>
like:<br>
<br>
if [ -x /sbin/ldconfig ]; then<br>
LDCONFIG=/sbin/ldconfig<br>
elif [ -x /usr/sbin/ldconfig ]; then<br>
LDCONFIG=/usr/sbin/ldconfig<br>
else<br>
echo "no acces to ldconfig" >&2<br>
exit 1<br>
fi<br>
<br>
LIBGIT=$(realpath $($LDCONFIG -p | grep libgit2\\.so\\. |<br>
cut -d\ -f4) | awk -Fo '{ print $NF }')<br>
<br>
maybe?<br></blockquote><div><br></div><div>or just add /sbin and /usr/sbin to PATH environment variable? <br></div></div></div>