Commit e52c664
Add SHA checking to get.sh download script
SHA256 checksum files were recently added to the releases page. This change uses these
in order to check the received binary. A new function has been introduced called checkHash
which checks that shasum is available on the system and if it does goes on to test the
newly received binary against the checksum calculated at build time. A subshell is invoked
within this function as shasum needs to be called in the same dir aas the binary and this location
can vary depending on the user context. Using a subshell means the directory switching is transparent
to the user, who remains where they started regardless of the script outcome.
Signed-off-by: Richard Gee <richard@technologee.co.uk>1 parent d33cb5c commit e52c664
1 file changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
| |||
56 | 70 | | |
57 | 71 | | |
58 | 72 | | |
59 | | - | |
| 73 | + | |
60 | 74 | | |
61 | 75 | | |
62 | | - | |
| 76 | + | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
| |||
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
72 | | - | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| 90 | + | |
| 91 | + | |
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
| |||
85 | 101 | | |
86 | 102 | | |
87 | 103 | | |
88 | | - | |
| 104 | + | |
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
| |||
94 | 110 | | |
95 | 111 | | |
96 | 112 | | |
97 | | - | |
| 113 | + | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
| |||
108 | 124 | | |
109 | 125 | | |
110 | 126 | | |
| 127 | + | |
| 128 | + | |
111 | 129 | | |
112 | 130 | | |
113 | 131 | | |
| |||
0 commit comments