3 ms·
curl could parse mime type and decide where to push the stream, POC: #!/usr/bin/env sh case $(curl -sLI $1 | grep -i content-type) in *tex
by agumonkey 12y ago
curl could parse mime type and decide where to push the stream, POC:
#!/usr/bin/env sh
case $(curl -sLI $1 | grep -i content-type) in
*text*) echo "curl $1"
;;
*) echo "curl $1 > $(basename $1)"
;;
esac
https://gist.github.com/agumonkey/b85cef0874822c470cc6 https://gist.github.com/agumonkey/b85cef0874822c470cc6
Costs of one round trip though.