diff options
author | Simon Rettberg | 2022-03-10 16:27:36 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-03-10 16:27:36 +0100 |
commit | bac1fb4f157022bdcebcda0a4951c76bb0c5597b (patch) | |
tree | 3266b2f7d1041173626f47801f33f9acff9f17c0 /core/modules/splashtool | |
parent | [remoteaccess] Delay submission of VNC password to avoid race (diff) | |
download | mltk-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-x | core/modules/splashtool/data/opt/openslx/bin/splashtool | 4 |
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 |