2021-10-25 05:07:51 +13:00
|
|
|
#!/bin/sh
|
2021-09-09 08:50:42 +12:00
|
|
|
|
2021-12-03 07:13:57 +13:00
|
|
|
if [ ! -z "${1}" ]; then
|
|
|
|
echo "Generating python file for ${1}"
|
|
|
|
pyuic5 "${1}" -x -o "${1%.ui}.py"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-10-25 05:07:51 +13:00
|
|
|
cwd="$(pwd)"
|
|
|
|
cd "$(dirname "$0")"/.. || exit
|
2021-09-09 08:50:42 +12:00
|
|
|
|
|
|
|
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"
|
2023-01-15 13:17:13 +13:00
|
|
|
sed '/QtCore.QMetaObject.connectSlotsByName/d' -i "${ui%.ui}.py"
|
2021-09-09 08:50:42 +12:00
|
|
|
done
|
|
|
|
|
2021-10-25 05:07:51 +13:00
|
|
|
cd "$cwd" || exit
|