diff --git a/scripts/py2ts.sh b/scripts/py2ts.sh new file mode 100755 index 00000000..a0f7463f --- /dev/null +++ b/scripts/py2ts.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +cwd="$(pwd)" +cd "$(dirname "$0")"/.. || exit + +pylupdate5 -noobsolete $(find rare/ -iname "*.py") -ts rare/languages/placeholder.ts + +cd "$cwd" || exit diff --git a/scripts/pylint.sh b/scripts/pylint.sh new file mode 100755 index 00000000..b7722934 --- /dev/null +++ b/scripts/pylint.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +cwd="$(pwd)" +cd "$(dirname "$0")"/.. || exit + +pylint -E rare --jobs=3 --disable=E0611,E1123,E1120 --ignore=ui,singleton.py --extension-pkg-whitelist=PyQt5 + +cd "$cwd" || exit diff --git a/ui2py.sh b/scripts/ui2py.sh similarity index 69% rename from ui2py.sh rename to scripts/ui2py.sh index 25e1e87c..c2f0e899 100755 --- a/ui2py.sh +++ b/scripts/ui2py.sh @@ -1,6 +1,7 @@ -#!/usr/bin/bash +#!/bin/sh -pushd "$(dirname "$0")" || exit +cwd="$(pwd)" +cd "$(dirname "$0")"/.. || exit changed="$(git diff --name-only HEAD | grep '\.ui')" @@ -9,4 +10,4 @@ for ui in $changed; do pyuic5 "${ui}" -x -o "${ui%.ui}.py" done -popd || exit +cd "$cwd" || exit