amiuhle / kasisto

A Monero Point of Sale payment system
https://amiuhle.github.io/kasisto/
MIT License
159 stars 39 forks source link

Issues in monero downloading code from README.md #16

Open emanuelb opened 7 years ago

emanuelb commented 7 years ago

from README.md:

# Download latest Monero release
curl https://downloads.getmonero.org/cli/monero-linux-x64-v0.10.2.1.tar.bz2 > /tmp/monero.tar.bz2
# Validate file
echo "9edba6ca91c35c6c2eb6816f9342931c88648de5beb471943ea63d0b16c9a2e4 /tmp/monero.tar.bz2" | sha256sum -c
# Extract binanries
tar -xf /tmp/monero.tar.bz2 -C /tmp && mv /tmp/monero-v0.10.2.1/* /usr/local/bin/
  1. use --location argument for curl instead of >
  2. use enviroment variable to store version (such as '0.10.2.1') and use it instead of hardcoded value.
  3. don't use static filename in /tmp , see: "Safely Creating Temporary Files in Shell Scripts" http://www.linuxsecurity.com/content/view/115462/151/ use mktemp command instead for temp file/dir.
  4. remove the archive file after extract operation.
amiuhle commented 6 years ago

Thanks for the input!

use --location argument for curl instead of >

--location is to follow redirects, --output would be the correct option. What's the advantage over > though?