summaryrefslogtreecommitdiff
path: root/scripts/build.sh
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2026-06-12 19:35:59 -0400
committerJonathan Bradley <jcb@pikum.xyz>2026-06-12 19:35:59 -0400
commit0a5898460e2c488c35564697a16c7912909012bd (patch)
tree56c6397ec4e46ce234089a4461da37a9ea861439 /scripts/build.sh
parenta9014785c95f28c4def7479265757cd6f3056862 (diff)
build.sh: append revision and notation to output
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh8
1 files changed, 7 insertions, 1 deletions
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"