summaryrefslogtreecommitdiffstats
path: root/core/modules/splashtool
diff options
context:
space:
mode:
authorSimon Rettberg2022-03-10 16:27:36 +0100
committerSimon Rettberg2022-03-10 16:27:36 +0100
commitbac1fb4f157022bdcebcda0a4951c76bb0c5597b (patch)
tree3266b2f7d1041173626f47801f33f9acff9f17c0 /core/modules/splashtool
parent[remoteaccess] Delay submission of VNC password to avoid race (diff)
downloadmltk-bac1fb4f157022bdcebcda0a4951c76bb0c5597b.tar.gz
mltk-bac1fb4f157022bdcebcda0a4951c76bb0c5597b.tar.xz
mltk-bac1fb4f157022bdcebcda0a4951c76bb0c5597b.zip
[splashtool] Fix reading size from ppm with comments
Diffstat (limited to 'core/modules/splashtool')
-rwxr-xr-xcore/modules/splashtool/data/opt/openslx/bin/splashtool4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/splashtool/data/opt/openslx/bin/splashtool b/core/modules/splashtool/data/opt/openslx/bin/splashtool
index eb0de564..69a76a40 100755
--- a/core/modules/splashtool/data/opt/openslx/bin/splashtool
+++ b/core/modules/splashtool/data/opt/openslx/bin/splashtool
@@ -131,9 +131,9 @@ else
ppm="${ppm}.gz"
fi
if [ "${ppm%.gz}" != "${ppm}" ]; then
- ppm_size="$(zcat "$ppm" | sed -n 2p)"
+ ppm_size="$( < "$ppm" zcat | head -n 5 | grep -v '^#' | sed -n 2p )"
else
- ppm_size="$(sed -n 2p "$ppm")"
+ ppm_size="$( < "$ppm" head -n 5 | grep -v '^#' | sed -n 2p )"
fi
if [ -z "$ppm_size" ]; then
echo "Invalid ppm? Could not extract dimensions" >&2