blob: 017fba0dc17dd31ef08722b3ea0b9916e6df6df0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/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
|