improve
authorJoey Hess <joeyh@joeyh.name>
Thu, 6 Mar 2025 18:54:05 +0000 (14:54 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 6 Mar 2025 18:54:05 +0000 (14:54 -0400)
doc/special_remotes/compute/git-annex-compute-imageconvert

index fb106e55d77cc92a8d1b171b93583de04b83946a..8edc6b8f24df2cf5e2462512bf5a067b29240612 100755 (executable)
@@ -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