Skip to content

Commit

Permalink
docs: resolve svgbob binary (#23399)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5877e38)

Co-authored-by: Trent Nelson <[email protected]>
  • Loading branch information
mergify[bot] and t-nelson authored Mar 1, 2022
1 parent 6b71570 commit e6f6a8a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/convert-ascii-to-svg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ set -e
cd "$(dirname "$0")"
output_dir=static/img

svgbob_cli="$(command -v svgbob_cli || true)"
if [[ -z "$svgbob_cli" ]]; then
svgbob_cli="$(command -v svgbob || true)"
[[ -n "$svgbob_cli" ]] || ( echo "svgbob_cli binary not found" && exit 1 )
fi

mkdir -p "$output_dir"

while read -r bob_file; do
out_file=$(basename "${bob_file%.*}".svg)
svgbob "$bob_file" --output "$output_dir/$out_file"
"$svgbob_cli" "$bob_file" --output "$output_dir/$out_file"
done < <(find art/*.bob)

while read -r msc_file; do
Expand Down

0 comments on commit e6f6a8a

Please sign in to comment.