Created
November 10, 2015 16:53
-
-
Save wtnb75/350e94cdee04733ac36e to your computer and use it in GitHub Desktop.
MicroPrint + Slic3r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
for i; do | |
#awk '{print;}/move to next layer/{ly=$(NF);gsub("[()]","",ly);print ";LAYER:"ly;}' ${i} > ${i}.new | |
awk 'BEGIN{ly=0;}{print;}/^G1 Z/{ly++;print ";LAYER:"ly;}' ${i} > ${i}.new | |
if cmp ${i} ${i}.new > /dev/null ; then | |
rm ${i}.new | |
else | |
mv $i ${i}.bak | |
mv ${i}.new ${i} | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment