From 9460393bb7e8d706c9cd2bc61bf0a779d66a0b77 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 19 Feb 2020 23:40:03 +0000 Subject: [PATCH] quacks-ingredients: gcode manipulation L234 Signed-off-by: Ian Jackson --- quacks-ingredients-make-copy-gcodes | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/quacks-ingredients-make-copy-gcodes b/quacks-ingredients-make-copy-gcodes index bcddcf7..35b2d84 100755 --- a/quacks-ingredients-make-copy-gcodes +++ b/quacks-ingredients-make-copy-gcodes @@ -39,17 +39,27 @@ for l in 1 2 3 4 5; do ' $g done +exec 3>${lhs}234.auto.gcode +for l in 2 3; do + gh + perl -pe 's/^/;/ if m/^M104 S0\b/ || (m/^M84/..0)' $g >&3 +done +for l in 4; do + gh + cat $g >&3 +done + umount /media/sd >/dev/null 2>&1 ||: mount /media/sd -for l in 1 2 3 4 5; do +for l in 1 2 3 4 5 234; do cp $g $h done umount /media/sd mount /media/sd -for l in 1 2 3 4 5; do +for l in 1 2 3 4 5 234; do gh cmp $g $h ls -l $h -- 2.30.2