blob: bc0252885dc22632b13e13ef2ae7f312816764e0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/sh
openbsdH="25a8dc77cda3d225c85d3f0cb318d01c17546c1c4a8c789a318f832ce1948bc3"
earlyCheck(){
os=`uname`
os=`echo $os | tr "[:upper:]" "[:lower:"]`
case $os in
*openbsd* ) ;;
*)
echo "Pre-built binary not available for your os"
exit 1
;;
esac
cpu=`uname -m`
cpu=`echo $cpu | tr "[:upper:]" "[:lower:"]`
case $cpu in
*amd*64* | *x86*64* ) ;;
*)
echo "Pre-built binary not available for your cpu"
exit 1
;;
esac
}
getURL(){
url="https://archive.org/download/grus-v0.1.0/grus-v0.1.0-$os-$cpu"
}
printURL(){
echo "You can get the Pre-built binary here:"
echo "$url"
echo
echo "Run these commands to install it on your device."
echo "# curl -L -o /usr/local/bin/grus $url"
echo "# chmod +x /usr/local/bin/grus"
echo
echo "This is sha256 hash for grus built for: $os $cpu"
case $os in
*openbsd* )
echo "$openbsdH"
;;
esac
echo
echo "Verify the hash by running sha256 on grus binary."
echo "$ sha256 /usr/local/bin/grus"
}
echo "Grus v0.1.0"
echo
earlyCheck
getURL
printURL
|