1
0
Fork 0
mirror of synced 2024-05-03 20:23:01 +12:00
Rare/misc/qrc2py.sh
loathingKernel 47b474a31a StyleSheets: Remove last use of custom noBorder property
Instead, use `QFrame.NoFrame` as `FrameShape` to set `0px` border width.
2022-10-29 14:50:18 +03:00

49 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
cwd="$(pwd)"
cd "$(dirname "$0")"/../ || exit
resources=(
"rare/resources/images/"
"rare/resources/colors/"
"rare/resources/resources.qrc"
)
resources_changed=0
for r in "${resources[@]}"
do
if [[ $(git diff --name-only HEAD "$r") ]]
then
resources_changed=1
fi
done
if [[ $resources_changed -eq 1 ]]
then
echo "Re-compiling main resources"
pyrcc5 -compress 6 \
rare/resources/resources.qrc \
-o rare/resources/resources.py
fi
if [[ $(git diff --name-only HEAD "rare/resources/stylesheets/RareStyle/") ]]
then
echo "Re-compiling RareStyle stylesheet resources"
pyrcc5 -compress 6 \
rare/resources/stylesheets/RareStyle/stylesheet.qrc \
-o rare/resources/stylesheets/RareStyle/__init__.py
fi
if [[ $(git diff --name-only HEAD "rare/resources/stylesheets/ChildOfMetropolis/") ]]
then
echo "Re-compiling ChildOfMetropolis stylesheet resources"
pyrcc5 -compress 6 \
rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qrc \
-o rare/resources/stylesheets/ChildOfMetropolis/__init__.py
fi
cd "$cwd" || exit