From f5e3f7a8a204395a3ac5e9954429b177f3761269 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 28 May 2026 17:31:38 -0500 Subject: [PATCH] Update: The generate unicode script to accept input file parameter. --- build/scripts/generate_unicode.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build/scripts/generate_unicode.sh b/build/scripts/generate_unicode.sh index cb541ca38..0aa074ac4 100644 --- a/build/scripts/generate_unicode.sh +++ b/build/scripts/generate_unicode.sh @@ -5,9 +5,13 @@ # A simple script for generating code regarding unicode values. # This requires the python "unicode" program. # +# Paramters: +# 1: mode. +# 2: input file (optional). +# # The following modes are supported: -# - source: Generate C source code if condition blocks (default). -# - test: Generate unit test byte data (in base 10) files. +# - source: Generate C source code if condition blocks (default). +# - test: Generate unit test byte data (in base 10) files. # main() { @@ -29,6 +33,10 @@ main() { local u3= local -i i=0 + if [[ ${2} != "" ]] ; then + file_input=${2} + fi + if [[ ${mode} == "" ]] ; then mode=source elif [[ ! (${mode} == "source" || ${mode} == "test") ]] ; then @@ -175,4 +183,4 @@ generate_test() { fi } -main "${1}" +main "${@}" -- 2.52.0