libdvdread detection
Status: Beta
Brought to you by:
steel_j
In the dvrequant script, the "type" shell command is
used to find libdvdread, which will never work. This is
caught by slocate which should work, so most people
will remain blissfully unaware of the problem.
However, the following fixes the problem:
# Try to find libdvdread.so.3, looking first in the
most obvious places
if [[ $( test -f /usr/lib/libdvdread.so.3 ) ]]; then
HAVE_READ="y"
elif [[ $( test -f /usr/local/lib/libdvdread.so.3 ) ]];
then HAVE_READ="y"
elif [[ $( slocate libdvdread.so.3 | head -n 1 ) ]];
then HAVE_READ="y"
fi
where test -f is used instead of type -p.
Logged In: YES
user_id=667288
Also true of test for libdvdcss
Logged In: YES
user_id=667288
Also, if you fix the code as suggested, this is the only
dependency on slocate, which I for one object to having on
my system merely to look for two libraries every time I
backup a dvd.
Logged In: YES
user_id=667288
if test -f /usr/lib/libdvdread.so.3 ; then
HAVE_READ="y"
elif test -f /usr/local/lib/libdvdread.so.3 );
then HAVE_READ="y"
fi
Logged In: YES
user_id=1659871
Originator: NO
What about?: /usr/lib64/... /usr/local/lib64/...
And why slocate? Many distros have locate and find but not slocate.
Nice script but I had to hack so it wouldn't complain on my Mandriva
x86_64 system.