From 1f59545ad094f48764e6cb0d7d9c63ae4b76d760 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Mar 2025 14:54:05 -0400 Subject: [PATCH] improve --- .../compute/git-annex-compute-imageconvert | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/special_remotes/compute/git-annex-compute-imageconvert b/doc/special_remotes/compute/git-annex-compute-imageconvert index fb106e55d7..8edc6b8f24 100755 --- a/doc/special_remotes/compute/git-annex-compute-imageconvert +++ b/doc/special_remotes/compute/git-annex-compute-imageconvert @@ -15,10 +15,11 @@ echo "INPUT $1" read input echo "OUTPUT $2" +# Prefixing with ./ makes sure that the output is treated as a +# filename, rather than a dashed option. +output="./$2" + if [ -n "$input" ]; then - # Prefixing the filenames with "./" makes sure that they are processed - # as files, even if they look like dashed options. - mkdir -p "$(dirname "./$2")" - ln -s "$input" "./$1" - convert "./$1" "./$2" + mkdir -p "$(dirname "$output")" + convert "$input" "$output" fi