YoRyan / nuxhash

A NiceHash cryptocurrency mining client for Linux.
GNU General Public License v3.0
264 stars 164 forks source link

Bourne shell string comparison uses a single equal #13

Closed jackm closed 6 years ago

jackm commented 6 years ago

excavator.sh is a shell script responsible for downloading the Nicehash excavator binary when starting nuxhash. It tries to check to see if the binary already exists and to verify file integrity, however an incorrect Bourne shell string comparison means it fails the verify stage and re-downloads the binary every time regardless.

Bourne shell uses a single equal for string comparison, where as Bash can use one or two equals to give the same effect.

Using the double equals as it currently is gives the following error when you start nuxhash: nuxhash/download/excavator.sh: 8: [: 270b14d9a177397b58f5e6696021ed4d: unexpected operator

With this change the download script can actually verify that the binary already exists and thus doesn't have to download it again.

YoRyan commented 6 years ago

Nice catch, thanks for the fix.