dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit a6c9b38ecf8d07f63f3cb018d1308b978a05f740
parent 20d4689fff5b3568c51dddd90cf691c7ec2892d9
Author: pyratebeard <root@pyratebeard.net>
Date:   Sun, 12 Sep 2021 23:14:50 +0100

setting for resolving imgur

Diffstat:
Mbin/bin/webimg | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/bin/webimg b/bin/bin/webimg @@ -1,4 +1,7 @@ #!/bin/sh +# ┓ ┳┳━┓┳━┓o┏┏┓┏━┓ +# ┃┃┃┣━ ┃━┃┃┃┃┃┃ ┳ +# ┗┻┇┻━┛┇━┛┇┛ ┇┇━┛ # # requires `identify` from imagemagick @@ -22,11 +25,12 @@ function show_img() { curl -s "${image}" --output ${img} else image="${image/http\:/https\:}" + image="${image/\/imgur/\/i\.imgur}" curl -s "${image}" --output ${img} fi - if identify ${img} >/dev/null 2>1 ; then - if identify ${img} | grep GIF >/dev/null 2>1 ; then + if identify ${img} 2>&1 1>/dev/null ; then + if identify ${img} | grep GIF 2>&1 1>/dev/null ; then mv "${img}" $(echo "${img}".gif) img="${img}.gif" fi