diff options
Diffstat (limited to 'sbopkglint')
-rwxr-xr-x | sbopkglint | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -409,8 +409,20 @@ while true; do esac done -# where the test scripts live, space-separated list. -SBOPKGLINT_PATH=${SBOPKGLINT_PATH:-"./sbopkglint.d /usr/share/sbo-maintainer-tools/sbopkglint.d /usr/local/share/sbo-maintainer-tools/sbopkglint.d"} +# where the test scripts live, space-separated list. to allow for +# running sbopkglint from within its own directory, without installing it, +# check for a sbopkglint.d in the script's dir. +script_dir="$( dirname $( realpath $0 ) )" + +# this line gets modified by 'make install'. +prefix_dir="@PREFIX@" + +case "$prefix_dir" in + @*) ;; # unset, don't use. + *) prefix_script_dir+=" $prefix_dir/share/sbo-maintainer-tools/sbopkglint.d" +esac + +SBOPKGLINT_PATH=${SBOPKGLINT_PATH:-"$script_dir/sbopkglint.d $prefix_script_dir"} if [ "$(id -u)" != "0" ]; then exec sudo \ |