forked from Zren/plasma-applet-commandoutput
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
25 lines (23 loc) · 922 Bytes
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Version 7
if [ -d "package/translate" ]; then
echo "[build] translate dir found, running merge."
(cd package/translate && sh ./merge && sh ./build)
if [ "$(git diff --stat .)" != "" ]; then
echo "[build] Changed detected. Cancelling build."
git diff --stat .
exit
fi
fi
plasmoidName=$(kreadconfig5 --file="$PWD/package/metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Name")
plasmoidName="${plasmoidName##*.}" # Strip namespace (Eg: "org.kde.plasma.")
plasmoidVersion=$(kreadconfig5 --file="$PWD/package/metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Version")
filenameTag="-plasma5.12"
rm ${plasmoidName}-v*.plasmoid
cd package
filename=${plasmoidName}-v${plasmoidVersion}${filenameTag}.plasmoid
zip -r $filename *
mv $filename ../$filename
cd ..
echo "md5: $(md5sum $filename | awk '{ print $1 }')"
echo "sha256: $(sha256sum $filename | awk '{ print $1 }')"