git ssb

16+

cel / patchfoo



Tree: c761008b5ab9e6a313b4031c440472ef39d59928

Files: c761008b5ab9e6a313b4031c440472ef39d59928 / binary-install-1.5.1.sh

4810 bytesRaw
1#!/bin/sh
2blobs_base=${SSB_BLOBS_BASE:-http://localhost:8989/blobs/get/}
3
4system=$(uname -sm) || exit 1
5case "$system" in
6 Linux\ x86_64) set -- \
7 '&hZbFmTg0iAA2A8oFsa9h0xnUaQcwha3Uc3L3UqXGRLQ=.sha256' \
8 '&ZZ5WetGZ8XE+EDV1WpnFTnvC+bwwna7GJAh71moEZdo=.sha256' \
9 '&9yI3nXRAnvHL8CHRjBekuNAX49Mr62x3ED5pJCeox8E=.sha256' \
10 '&mvroGi396ddexK8P8rG7LB7Aa7tSy41HWOUKkcj/f70=.sha256';;
11
12 Linux\ armv7l) set -- \
13 '&6wUnJemNZL4shqMtY9WuAVvawLDd2FTJ41rRK8UHmnk=.sha256' \
14 '&zCLxOnVldm15btsYdE+I4oBx8qBS1vik1Li2vBOq6+w=.sha256' \
15 '&u7VGC7ZGAPmWVdOK4TrPUy8aZJdEEIdEhZCKiZr+sww=.sha256';;
16
17 Linux\ aarch64) set -- \
18 '&Jc9/FPgceGCuFXuNqwKKGZ8L473eROk+hC77/ASoJXo=.sha256' \
19 '&PNIHuOe1UQbXlYQEeUSjWaqed89Ofnm/9rvRKn2UZx8=.sha256' \
20 '&qHjyUv4KXapV9Ov18Dpe8JE2m+HADwa4renY5s/s4yA=.sha256' \
21 '&V8nCNHM+qehWik635M3eOECGjJCdFlCmT26tFZPSeyc=.sha256';;
22
23 Linux\ i686) set -- \
24 '&irNubuQ8WiKiRqurQa/jg1bs31Y28WOn1qfX7Ht2D34=.sha256' \
25 '&9H8hgabAi6HDmbiNBGPuly7WxDzpR+3S8/jNcbFWPJE=.sha256' \
26 '&fbFIoiLnYOmrj6nbgtdbPOUtllfc9i9VOMaLZiWMgrQ=.sha256' \
27 '&E/lR2RF3arDd6YU41lcjSalNFCf/ZuB/kQDz0zOtrwk=.sha256';;
28
29 Darwin*\ x86_64) set -- \
30 '&ZAhFFGRgf14kUiRlUx0wMOoL7yGluiLUME2XxmiLNt0=.sha256' \
31 '&vjbdlUdW0MtVO7iRseEWpMYZlk4fefVsO5+ljYL7ckE=.sha256' \
32 '&Ork3//T8ogpZ3lOQRg0Z5Uw+MdJLNpWTo6OWysqIrkE=.sha256';;
33
34 *)
35 printf 'System not recognized: %s\n' "$system" >&2
36 exit 1
37 ;;
38esac
39
40install_js_blob='&Tf/6MqAfPUhyEpL6nLzyLoosc/h9qIvG0YM2FxTTYkU=.sha256'
41exec 3<<EOF
42{
43 "preludeBlobs": [
44 {
45 "link": "&2AMoW67mf2KJjmi5Krjkh9klw2vlQtXKbAYwPFKM75M=.sha256",
46 "size": 58477
47 }
48 ],
49 "payloadBlobs": [
50 {
51 "link": "&QgahmPYImelvhuCkBlpGwAIAYz0n6Wf5saxhC443bcw=.sha256",
52 "size": 2006279
53 }
54 ],
55 "vfsBlobs": [
56 {
57 "link": "&5FR5YRjuivUISmFAgUFjCwNyPEQtKCPgvODy1MjN0ro=.sha256",
58 "size": 170580
59 }
60 ],
61 "binName": "patchfoo",
62 "entrypoint": "/snapshot/patchfoo/server.js",
63 "otherEntrypoints": {},
64 "bakes": [],
65 "fileBlobs": {
66 "linux-x64": {
67 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-x64/libsodium.so.23": [
68 {
69 "link": "&xkfpCir6wO2O+H+5fX4yUDglEO9BSENzsDAsEU8jn0w=.sha256",
70 "size": 350840
71 }
72 ],
73 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-x64/node.abi72.node": [
74 {
75 "link": "&jmU1pe8u2k8T7RorVuVranTiHRDU0slhOle4FaslkWE=.sha256",
76 "size": 258696
77 }
78 ]
79 },
80 "linux-arm": {
81 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm/libsodium.so.23": [
82 {
83 "link": "&RQlPII/l+Wi+RRfhZhGHUHy4oBHAdza+fpKR0X6r7ZY=.sha256",
84 "size": 316988
85 }
86 ],
87 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm/node.abi72.node": [
88 {
89 "link": "&o4YuWR2yE6UgTYkMhKYu7sv9LC9aJCD3dnCw0rDvOyo=.sha256",
90 "size": 208092
91 }
92 ]
93 },
94 "linux-arm64": {
95 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm64/libsodium.so.23": [
96 {
97 "link": "&yd3bUP7LOKp0bupg1uVdcrG76pHgNQQZwXKZr39aLIY=.sha256",
98 "size": 186456
99 }
100 ],
101 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm64/node.abi72.node": [
102 {
103 "link": "&CU0SgLTi6yDE/cu0FHwTyNdV8YcGI6SkPwDLMk7rO80=.sha256",
104 "size": 262552
105 }
106 ]
107 },
108 "linux-ia32": {
109 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-ia32/libsodium.so.23": [
110 {
111 "link": "&OJ3FP9WsuTfVWqRZxTALEs+2ySz5GD9FI4p7WqzeYok=.sha256",
112 "size": 427400
113 }
114 ],
115 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-ia32/node.abi72.node": [
116 {
117 "link": "&T/ypp7mNF7nJILu6hPgvRJ5hkw87ljeEHKEzl/EUXdc=.sha256",
118 "size": 268932
119 }
120 ]
121 },
122 "darwin-x64": {
123 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/darwin-x64/libsodium.dylib": [
124 {
125 "link": "&OwrqYgZTxwX7Atiw82wg7kl7nERCnY76BPsO7RuEiD4=.sha256",
126 "size": 395136
127 }
128 ],
129 "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/darwin-x64/node.abi72.node": [
130 {
131 "link": "&C8jvyOk2eRXuuYmqyKBNh1BKfIIyMchfk3x2m1L/7uc=.sha256",
132 "size": 214848
133 }
134 ]
135 }
136 }
137}
138EOF
139
140tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || exit 1
141node_bin="$tmp_dir/ssb-pkg-node-$$"
142install_js="$tmp_dir/ssb-pkg-install-$$"
143
144while ! for id; do
145 echo "$id" >&2
146 curl -sS "$blobs_base$id"
147done | gunzip > "$node_bin"; do sleep 2; done
148chmod +x "$node_bin"
149
150while ! curl -sS "$blobs_base$install_js_blob" -o "$install_js"
151do sleep 1; done
152"$node_bin" "$install_js"
153rc=$?
154rm -rf "$tmp_dir"
155exit $rc
156

Built with git-ssb-web