So I've built a cli tool (using `kotlinx-cli`) that takes diffs of files so you can apply them later...
m
So I've built a cli tool (using
kotlinx-cli
) that takes diffs of files so you can apply them later (because apple/windows code signing of binaries is not reproducible). Is there a better way of passing arguments via terminal to a native program? I'm currently only utilizing it in 1 project as a tool, and doing so via bash script
Copy code
#!/bin/sh
# tooling
# builds and passes arguments to module executable within the tools directory

TOOL="$1"; shift 1

if [ -z "${TOOL}" ] || [ ! -d "tools/${TOOL}" ]; then
  echo "Unknown tool: '${TOOL}'"
  exit 1
fi

./gradlew --quiet ":tools:${TOOL}:build" && "./tools/${TOOL}/build/bin/${TOOL}/releaseExecutable/${TOOL}.kexe" "$@"
./tooling diff-cli create /unsigned/file /signed/file /diffs/
`arg1`: (reproducibly built binary) `arg2`: (binary after code signing) `arg3`: (dir to output the
.diff
file)
./tooling diff-cli apply /diffs/file.diff /unsigned/file
`arg1`: (diff file previously generated) `arg2`: (reproducibly built binary to apply the diff to)