diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/execute_command.sh | 2 | ||||
| -rwxr-xr-x | tools/fs_patch.sh | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/execute_command.sh b/tools/execute_command.sh index b98aa55..c6504bf 100755 --- a/tools/execute_command.sh +++ b/tools/execute_command.sh @@ -68,7 +68,7 @@ main() { # Run command (do not let failures exit the tool) set +e - bash -lc "$cmd" >"$out_file" 2>"$err_file" + : | bash -lc "$cmd" >"$out_file" 2>"$err_file" rc=$? set -e diff --git a/tools/fs_patch.sh b/tools/fs_patch.sh index 2d9d7e4..a87cef5 100755 --- a/tools/fs_patch.sh +++ b/tools/fs_patch.sh @@ -6,6 +6,15 @@ set -uo pipefail # @option --path The path of the file to apply to # @option --contents The patch to apply to the file # @env LLM_OUTPUT=/dev/stdout The output path +# +# Example: +# --- a/hello.py +# +++ b/hello.py +# \@@ ... @@ +# def hello(): +# - print("Hello World") +# + name = input("What is your name? ") +# + print(f"Hello {name}") ROOT_DIR="${LLM_ROOT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" OUT="${LLM_OUTPUT:-/dev/stdout}" |
