From 2726f2d80ff00df1aa2df4996fd21a300151ca05 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Thu, 30 May 2024 12:35:38 -0700 Subject: [PATCH] Add tools/gencommit.sh which will only generate the commithash SVG This is useful so we aren't wasting cycles generating examples that don't need to be generated and we just cut to the chase Signed-off-by: Alek Ratzloff --- examples/commithash.svg | 80 ++++++++++++++++++++--------------------- tools/gencommit.sh | 8 +++++ tools/genexamples.sh | 3 +- 3 files changed, 49 insertions(+), 42 deletions(-) create mode 100755 tools/gencommit.sh diff --git a/examples/commithash.svg b/examples/commithash.svg index 1e0ff76..4c48ac7 100644 --- a/examples/commithash.svg +++ b/examples/commithash.svg @@ -1,42 +1,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/gencommit.sh b/tools/gencommit.sh new file mode 100755 index 0000000..8603796 --- /dev/null +++ b/tools/gencommit.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -eo pipefail +here="$(dirname "$(realpath "$0")")" +cd "$here/.." + +echo "Generating examples/commithash.svg" +python3 -m colorhash "$(git rev-parse HEAD)" --input-type hash --hash sha1 --output-type svg --out examples/commithash.svg + diff --git a/tools/genexamples.sh b/tools/genexamples.sh index 1e7b821..ec03ce3 100755 --- a/tools/genexamples.sh +++ b/tools/genexamples.sh @@ -22,5 +22,4 @@ while read infile; do done # Additionally, create an SVG for the current commit hash -echo "Generating examples/commithash.svg" -python3 -m colorhash "$(git rev-parse HEAD)" --input-type hash --hash sha1 --output-type svg --out examples/commithash.svg +tools/gencommit.sh