diff options
author | Camil Staps | 2017-02-20 10:06:38 +0100 |
---|---|---|
committer | Camil Staps | 2017-02-20 10:06:38 +0100 |
commit | 73ae3a47a410eb2db9c3c776c0252e1feaeb2d7e (patch) | |
tree | 4835551f5d769ede433ed390d3cfc2406975480c /vim/bin/pylint.sh | |
parent | Cloogle stats in status bar (diff) |
Reorganise binaries
Diffstat (limited to 'vim/bin/pylint.sh')
-rwxr-xr-x | vim/bin/pylint.sh | 19 |
1 files changed, 19 insertions, 0 deletions
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}" + |