summaryrefslogtreecommitdiffstats
path: root/core/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-06 10:02:56 +0200
committerSimon Rettberg2020-10-06 10:02:56 +0200
commitebddfac014cfee9eab06afa50f04fb9e16c56f3b (patch)
tree34297836c5dc3e31e4675e9c9d34695015b7a407 /core/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo
parent[dhcpc-busybox] merge "search" entries (diff)
downloadmltk-ebddfac014cfee9eab06afa50f04fb9e16c56f3b.tar.gz
mltk-ebddfac014cfee9eab06afa50f04fb9e16c56f3b.tar.xz
mltk-ebddfac014cfee9eab06afa50f04fb9e16c56f3b.zip
[*] Helper script to add text to lightdm logo, and change its color
Diffstat (limited to 'core/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo')
-rwxr-xr-xcore/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo
new file mode 100755
index 00000000..fb339105
--- /dev/null
+++ b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/scripts/lightdm-patch_logo
@@ -0,0 +1,15 @@
+#!/bin/ash
+
+text="$1"
+color=
+if [ -n "$2" ]; then
+ color=";s:#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]*:${2}:gI"
+fi
+
+text="${text//</}"
+text="${text//>/}"
+text="${text//:/}"
+text="${text//'"'/}"
+
+# Add text to bwLehrpool logo
+sed -i "s:<!--SUBTITLE-->:${text}:${color}" '/opt/openslx/lightdm/bwlp-banner.svg'