improve
This commit is contained in:
parent
138421449e
commit
1f59545ad0
1 changed files with 6 additions and 5 deletions
|
@ -15,10 +15,11 @@ echo "INPUT $1"
|
||||||
read input
|
read input
|
||||||
echo "OUTPUT $2"
|
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
|
if [ -n "$input" ]; then
|
||||||
# Prefixing the filenames with "./" makes sure that they are processed
|
mkdir -p "$(dirname "$output")"
|
||||||
# as files, even if they look like dashed options.
|
convert "$input" "$output"
|
||||||
mkdir -p "$(dirname "./$2")"
|
|
||||||
ln -s "$input" "./$1"
|
|
||||||
convert "./$1" "./$2"
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue