1
0
Fork 0
isopod.cool/stuff/webpkiller/webpkiller.sh

21 lines
382 B
Bash
Raw Normal View History

2023-01-09 21:30:45 +00:00
#!/bin/bash
if [ ! -f "$1" ]; then
echo "File $1 does not exist. Aborting..."
exit
fi
suffix=".webp"
filename=${1%"$suffix"}
outfile="$filename.png"
if [ -f "$outfile" ]; then
echo "File $outfile already exists. Aborting..."
notify-send --app-name=webpkiller "File $outfile already exists. Aborting..."
exit
fi
magick $1 $outfile
rm -rf $1
xdg-open $outfile