X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=pylint;h=d0474b4f90bd5ae1357bb857d43d9915a2aa4299;hb=0840163bf2d3e9467807772283677856bb799887;hp=c04af785d65941145e36b7a9dd5721578f1c403a;hpb=54b0467e48d27925ca8368d1f03c6254412b2786;p=bup.git diff --git a/pylint b/pylint index c04af78..d0474b4 100755 --- a/pylint +++ b/pylint @@ -1,9 +1,36 @@ -#!/bin/sh +#!/usr/bin/env bash # Changes here might also be appropriate for ./pytest set -eu +with_pylint=$(cat config/config.var/with-pylint) + +case "$with_pylint" in + yes) ;; + no) + echo "./pylint: doing nothing given ./configure --with-pylint=no" 1>&2 + exit 0 + ;; + maybe) + rc=0 + dev/have-pylint || rc=$? + case "$rc" in + 0) ;; + 1) + echo "./pylint: doing nothing (pylint not found)" 1>&2 + exit 0 + ;; + *) exit "$rc" ;; + esac + ;; + *) + printf "./pylint: unexpected config/config.var/with-pylint value %q\n" \ + "$with_pylint" 1>&2 + exit 2 + ;; +esac + script_home="$(cd "$(dirname "$0")" && pwd -P)" testlibdir="$script_home/test/lib"