This commit is contained in:
Joey Hess 2025-03-06 14:54:05 -04:00
parent 138421449e
commit 1f59545ad0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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