From 825a648670da28c2ae120fdc84fdbf74ba66cae0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Mar 2025 14:42:07 -0400 Subject: [PATCH] prefix output with ./ in example --- doc/design/compute_special_remote_interface.mdwn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/design/compute_special_remote_interface.mdwn b/doc/design/compute_special_remote_interface.mdwn index 869883f918..2c97946a81 100644 --- a/doc/design/compute_special_remote_interface.mdwn +++ b/doc/design/compute_special_remote_interface.mdwn @@ -100,8 +100,11 @@ An example `git-annex-compute-foo` shell script follows: echo "INPUT $2" read input echo "OUTPUT $3" + # Prefixing with ./ makes sure that the output is treated as a + # filename, rather than a dashed option. + output="./$3" echo REPRODUCIBLE if [ -n "$input" ]; then - mkdir -p "$(dirname "$3")" - frobnicate --passes="$ANNEX_COMPUTE_passes" <"$input" >"$3" + mkdir -p "$(dirname "$output")" + frobnicate --passes="$ANNEX_COMPUTE_passes" <"$input" >"$output" fi