1
0
Fork 0
isopod.cool/stuff/webpkiller/webpkiller.sh
2024-09-30 13:29:41 -06:00

20 lines
382 B
Bash
Executable file

#!/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