urjaman reported install_lib()'s "rm /usr/lib/${baseso}*" somehow
destroyed his /usr/lib, so patch around empty ${baseso}. No idea how
exactly it happened though. Not bumping the version to not cause an
update, which will just bring risks without benefits.
# $1 - full pathname, like /usr/lib/ES5.0/libGLESv2.so.1.4.14.2616
install_lib()
{
- base=`basename $1`
- baseso=`echo $base | sed -e 's:\(lib.*.so\).*:\1:'`
+ base=`basename "$1"`
+ baseso=`echo "$base" | sed -e 's:\(lib.*.so\).*:\1:;s/[[:blank:]]//g'`
+ test -z "${baseso}" && return
+
rm /usr/lib/${baseso}*
cp -a $1 /usr/lib/