From 0a5898460e2c488c35564697a16c7912909012bd Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 12 Jun 2026 19:35:59 -0400 Subject: build.sh: append revision and notation to output --- scripts/build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build.sh b/scripts/build.sh index 3cc9e1d..9b35105 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -9,10 +9,13 @@ build_base_command() { local file_name=$1 local file_type=$2 local file_path="$PWD/src/$file_name.chordpro" + local revision="" + local xc="roman" local x_vars=$(sed -n "s/^{\(x_.\+:.\+\)}.*/\1/p" $file_path | sed "s/:/=/") command_builder+=" chordpro" + command_builder+=" --transcode=$xc" command_builder+=" --config=$PWD/config.json" if [[ -f "$PWD/configs/$file_name.json" ]] ; then @@ -21,11 +24,14 @@ build_base_command() { if [ -z "" ]; then while IFS= read -r line; do + if [[ "$line" == "x_revision"* ]]; then + revision=$(echo $line | cut -d'=' -f2) + fi command_builder+=" --meta $line" done <<< "$x_vars" fi - command_builder+=" -o $PWD/out/$file_name.$file_type" + command_builder+=" -o $PWD/out/$file_name.v$revision.$xc.$file_type" command_builder+=" $file_path" -- cgit v1.2.3