diff --git a/to-m4b.sh b/to-m4b.sh index 540d0b0..bb79228 100755 --- a/to-m4b.sh +++ b/to-m4b.sh @@ -4,6 +4,8 @@ set -eufo pipefail # CONSTANTS declare -r script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# Use an array for the executable to avoid word-splitting issues +declare -ra m4b_tool_bin=(nix run github:sandreas/m4b-tool#m4b-tool-libfdk --) # VARS LEADING_ZEROES=2 @@ -178,7 +180,7 @@ m4b-merge() { fi args+=("--output-file=${output_file}" -- "${source_dir}") - nix run github:sandreas/m4b-tool#m4b-tool-libfdk -- "${args[@]}" + "${m4b_tool_bin[@]}" "${args[@]}" } main() {