title: Download file with curl and pipe it through sha1sum into tar
body: <p>I would like to download a file with curl, check its checksum with sha1sum (or a similar tool) and pipe the file into tar to unpack it, given that the result of sha1sum was a 0.</p>
  
  <p>I know that without the checksum verfication it would be a simple <code>curl &lt;link&gt; | tar x</code> , however I'm having a hard time fitting sha1sum in there since its syntax is very foreign to me. I could probably manage to do it if sha1sum was able to receive the checksum as a parameter and read the file from stdin, but as far as I have seen this is not possible. Is there a way to achieve this nontheless?</p>