in-toto / witness

Witness is a pluggable framework for software supply chain risk management. It automates, normalizes, and verifies software artifact provenance.
https://witness.dev
Apache License 2.0
416 stars 60 forks source link

fix:various fixes and improvements in install script #247

Closed colek42 closed 1 year ago

colek42 commented 1 year ago

removes the need for jq and sudo better logic for checking checksums adds an argument so that the user can install it in any directory asks for a password if sudo is required

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4208093622


Totals Coverage Status
Change from base Build 3959938753: 0.0%
Covered Lines: 111
Relevant Lines: 405

💛 - Coveralls
colek42 commented 1 year ago
(base) ➜  witness git:(fix_install_script) ./install-witness.sh 
Latest version of Witness is 0.1.12
Downloading for linux amd64 from https://github.com/testifysec/witness/releases/download/v0.1.12/witness_0.1.12_linux_amd64.tar.gz
expected checksum: 7bc55e03a376577313a2e546b826173e6ae02ba7ff49d9c686fb55b084bd5a12
file checksum:     7bc55e03a376577313a2e546b826173e6ae02ba7ff49d9c686fb55b084bd5a12
You don't have permission to move the file, if you would like to install Witness to /usr/local/bin, please enter your password.
You can also install Witness to a different directory by running this script with the directory as the first argument.
[sudo] password for nkennedy: 
witness v0.1.12-f4304f5
Witness v0.1.12 has been installed at /usr/local/bin/witness
(base) ➜  witness git:(fix_install_script) ./install-witness.sh .
Latest version of Witness is 0.1.12
Downloading for linux amd64 from https://github.com/testifysec/witness/releases/download/v0.1.12/witness_0.1.12_linux_amd64.tar.gz
expected checksum: 7bc55e03a376577313a2e546b826173e6ae02ba7ff49d9c686fb55b084bd5a12
file checksum:     7bc55e03a376577313a2e546b826173e6ae02ba7ff49d9c686fb55b084bd5a12
witness v0.1.12-f4304f5
Witness v0.1.12 has been installed at /home/nkennedy/proj/witness/witness
(base) ➜  witness git:(fix_install_script) ✗ rm witness 
(base) ➜  witness git:(fix_install_script)