summaryrefslogtreecommitdiffstats
path: root/core/modules/splashtool
diff options
context:
space:
mode:
authorSimon Rettberg2020-09-02 13:06:52 +0200
committerSimon Rettberg2020-09-02 13:06:52 +0200
commitb99ae4c451c8522c58ddbccaffc13f6a956a11b6 (patch)
treea48bfa52199318eb06c7549c7997448585c9f1e4 /core/modules/splashtool
parent[splashtool] Fix .gz fallback (diff)
downloadmltk-b99ae4c451c8522c58ddbccaffc13f6a956a11b6.tar.gz
mltk-b99ae4c451c8522c58ddbccaffc13f6a956a11b6.tar.xz
mltk-b99ae4c451c8522c58ddbccaffc13f6a956a11b6.zip
[splashtool] Support globbing for --icon mode
Will automatically use only the first match.
Diffstat (limited to 'core/modules/splashtool')
-rwxr-xr-xcore/modules/splashtool/data/opt/openslx/bin/splashtool12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/modules/splashtool/data/opt/openslx/bin/splashtool b/core/modules/splashtool/data/opt/openslx/bin/splashtool
index b8787365..1c168c7d 100755
--- a/core/modules/splashtool/data/opt/openslx/bin/splashtool
+++ b/core/modules/splashtool/data/opt/openslx/bin/splashtool
@@ -34,7 +34,15 @@ shift
if [ "$mode" = "reset" ]; then
base="$ppm/inactive"
elif [ "$mode" = "icon" ]; then
- base="$( dirname "$( dirname "$ppm" )" )/inactive"
+ base="${base%/*}"
+ base="${base%/*}"
+ base="${base:-.}/inactive"
+ globname() (
+ IFS=
+ set -- $1
+ printf "%s" "$1"
+ )
+ ppm="$( globname "$ppm" )"
fi
if [ -n "$base" ]; then
@@ -133,7 +141,7 @@ else
ppm_height="${ppm_size#* }"
ppm_height="${ppm_height%% *}" # make sure nothing weird is trailing
# pos
- imf_left=0
+ img_left=0
img_top=0
case "$mode" in
center|tr|br) img_left="$(( screen_width - ppm_width ))" ;;