aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/apply-colormap5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/apply-colormap b/tools/apply-colormap
index 56d90e0..d59ddd2 100755
--- a/tools/apply-colormap
+++ b/tools/apply-colormap
@@ -73,9 +73,8 @@ colormap() {
}
palette() {
- printf "palette"
- sed "/^\\s*#/d; s/\\s*#.*//" <"$PALETTE" \
- | sed -nr "1h;1!H; \${x; s/^\\s*/ /; s/\s+/ /g; p}"
+ { echo "palette"; sed "/^\\s*#/d; s/\\s*#.*//" <"$PALETTE"; } \
+ | sed -r ':a; $!N; s/\n/ /; ta; s/\s+/ /g'
}
serial_send() {