From 73ae3a47a410eb2db9c3c776c0252e1feaeb2d7e Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 20 Feb 2017 10:06:38 +0100 Subject: Reorganise binaries --- vim/bin/pylint.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 vim/bin/pylint.sh (limited to 'vim') diff --git a/vim/bin/pylint.sh b/vim/bin/pylint.sh new file mode 100755 index 0000000..546f8c8 --- /dev/null +++ b/vim/bin/pylint.sh @@ -0,0 +1,19 @@ +#!/bin/bash +PYMAJOR=$1 + +if [ "$1" = "--version" ] +then + pylint --version + return +fi + +if [[ "$PYMAJOR" != "2" ]] && [[ "$PYMAJOR" != "3" ]] +then + PYMAJOR=2 + grep '#!.*python3' "${@: -1}" >/dev/null && PYMAJOR=3 +fi + +echo "Using python$PYMAJOR" + +/usr/bin/env "python$PYMAJOR" -m pylint "${@:2}" + -- cgit v1.2.3