From: Hugo Villeneuve Date: Wed, 29 Nov 2023 22:44:50 +0000 (-0500) Subject: Fix bug in get_pos() for negative positions X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=5d4c7f3ccfb9daa56fcd6e3bda7fe1bef4761163;p=fgen.git Fix bug in get_pos() for negative positions --- 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