summaryrefslogtreecommitdiff
path: root/scripts/convert.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/convert.sh')
-rwxr-xr-xscripts/convert.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/convert.sh b/scripts/convert.sh
new file mode 100755
index 0000000..97f6d9b
--- /dev/null
+++ b/scripts/convert.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+[ -z "$1" ] && exit 1
+basename=${1%.*}
+basename=${basename##*/}
+magick "$1" -resize 480x ./assets/"$basename".png
+magick ./assets/"$basename".png ./assets/"$basename".webp