summaryrefslogtreecommitdiff
path: root/scripts/build.sh
diff options
context:
space:
mode:
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"