1
0
Fork 0
mirror of synced 2024-06-02 10:44:40 +12:00
Rare/misc/ui2py.sh
2021-12-05 19:47:06 +01:00

20 lines
363 B
Bash
Executable file

#!/bin/sh
if [ ! -z "${1}" ]; then
echo "Generating python file for ${1}"
pyuic5 "${1}" -x -o "${1%.ui}.py"
exit 0
fi
cwd="$(pwd)"
cd "$(dirname "$0")"/.. || exit
changed="$(git diff --name-only HEAD | grep '\.ui')"
for ui in $changed; do
echo "Generating python file for ${ui}"
pyuic5 "${ui}" -x -o "${ui%.ui}.py"
done
cd "$cwd" || exit