/usr/share/doc/vile-common/examples/vile-libdir-path is in vile-common 9.8s-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/bin/sh
# $Id: vile-libdir-path,v 1.1 2014/07/04 14:42:57 tom Exp $
# Find the given vile helper-program, either in $PATH, or in a related
# lib-directory. If the program is already in $PATH, no change will be made.
failed() {
echo "?? $*" >&2
exit 1
}
HELPER=vile-manfilt
test $# != 0 && HELPER="$1"
OK_BIN=no
OK_LIB=
SAVE="$IFS"
IFS=':'
for dir in $PATH
do
if test -f $dir/$HELPER
then
OK_BIN=yes
break
elif test -z "$OK_LIB"
then
test -f $dir/vile || continue
head=`echo "$dir" | sed -e 's,/[^/]*$,,'`
for libs in \
$head/lib[1-9]* \
$head/lib[1-9]*/*vile
do
test -d "$libs" || continue
if test -f $libs/$HELPER
then
OK_LIB=$libs
fi
done
fi
done
IFS="$SAVE"
if test $OK_BIN = yes
then
echo "$PATH"
elif test -n "$OK_LIB"
then
echo "$OK_LIB:$PATH"
else
failed "cannot find $HELPER"
fi
|