rifle handles image urls not exactly the right way

This commit is contained in:
Felix Van der Jeugt 2015-11-24 20:40:30 +01:00
parent 13aef30648
commit 695bc1cf68

View File

@ -1,2 +1,5 @@
#!/bin/bash #!/bin/bash
rifle "$1" | grep 'cannot open' && xdg-open "$1" curl -IL "$1" \
| grep Content-Type \
| tail -n 1 \
| grep image && rifle "$1" || xdg-open "$1"