From 5d4c7f3ccfb9daa56fcd6e3bda7fe1bef4761163 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 29 Nov 2023 17:44:50 -0500 Subject: [PATCH] Fix bug in get_pos() for negative positions --- fgen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fgen.sh b/fgen.sh index 5cdc85f..c4c6fe9 100755 --- a/fgen.sh +++ b/fgen.sh @@ -68,7 +68,7 @@ function get_size() # Arg1: layer function get_pos() { - cat ${layers} | grep "${1}" | ${SED} "s/.*geometry:[0-9]\+x[0-9]\+\(+[0-9]\++[0-9]\+\),.*/\1/g" + cat ${layers} | grep "${1}" | ${SED} "s/.*geometry:[0-9]\+x[0-9]\+\([+-][0-9]\+[+-][0-9]\+\),.*/\1/g" } # Arg1: line -- 2.20.1