14 lines
294 B
Plaintext
14 lines
294 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
mkdir -p /tmp/dds > /dev/null
|
||
|
|
||
|
for file in "$@"
|
||
|
do
|
||
|
echo "$file"
|
||
|
dirname=$(dirname "$file")
|
||
|
basename=$(basename "$file")
|
||
|
extname="${file#${file%.*}}"
|
||
|
filename=$(basename "$basename" "$extname")
|
||
|
|
||
|
convert -flip "$file" "$dirname/$filename.png" && rm $file
|
||
|
done
|