aboutsummaryrefslogtreecommitdiff
path: root/binary-install-1.6.0.sh
diff options
context:
space:
mode:
Diffstat (limited to 'binary-install-1.6.0.sh')
-rwxr-xr-xbinary-install-1.6.0.sh154
1 files changed, 154 insertions, 0 deletions
diff --git a/binary-install-1.6.0.sh b/binary-install-1.6.0.sh
new file mode 100755
index 0000000..fb950bd
--- /dev/null
+++ b/binary-install-1.6.0.sh
@@ -0,0 +1,154 @@
+#!/bin/sh
+blobs_base=${SSB_BLOBS_BASE:-http://localhost:8989/blobs/get/}
+
+system=$(uname -sm) || exit 1
+case "$system" in
+ Linux\ x86_64) set -- \
+ '&hZbFmTg0iAA2A8oFsa9h0xnUaQcwha3Uc3L3UqXGRLQ=.sha256' \
+ '&ZZ5WetGZ8XE+EDV1WpnFTnvC+bwwna7GJAh71moEZdo=.sha256' \
+ '&9yI3nXRAnvHL8CHRjBekuNAX49Mr62x3ED5pJCeox8E=.sha256' \
+ '&mvroGi396ddexK8P8rG7LB7Aa7tSy41HWOUKkcj/f70=.sha256';;
+
+ Linux\ armv7l) set -- \
+ '&6wUnJemNZL4shqMtY9WuAVvawLDd2FTJ41rRK8UHmnk=.sha256' \
+ '&zCLxOnVldm15btsYdE+I4oBx8qBS1vik1Li2vBOq6+w=.sha256' \
+ '&u7VGC7ZGAPmWVdOK4TrPUy8aZJdEEIdEhZCKiZr+sww=.sha256';;
+
+ Linux\ aarch64) set -- \
+ '&YipJtv476bRmvbTinajIqj9s61h7/ltqwYpANup3Kb0=.sha256' \
+ '&2Sy49KEmcNoLSOTUoqE6ZAA1qABRvEzpJlQijt5f3Mk=.sha256' \
+ '&q4Fv+iiL+px4GIr0Zpwk1MFf1/DlT/5smU2ErpxQMp0=.sha256';;
+
+ Linux\ i686) set -- \
+ '&irNubuQ8WiKiRqurQa/jg1bs31Y28WOn1qfX7Ht2D34=.sha256' \
+ '&9H8hgabAi6HDmbiNBGPuly7WxDzpR+3S8/jNcbFWPJE=.sha256' \
+ '&fbFIoiLnYOmrj6nbgtdbPOUtllfc9i9VOMaLZiWMgrQ=.sha256' \
+ '&E/lR2RF3arDd6YU41lcjSalNFCf/ZuB/kQDz0zOtrwk=.sha256';;
+
+ Darwin*\ x86_64) set -- \
+ '&ZAhFFGRgf14kUiRlUx0wMOoL7yGluiLUME2XxmiLNt0=.sha256' \
+ '&vjbdlUdW0MtVO7iRseEWpMYZlk4fefVsO5+ljYL7ckE=.sha256' \
+ '&Ork3//T8ogpZ3lOQRg0Z5Uw+MdJLNpWTo6OWysqIrkE=.sha256';;
+
+ *)
+ printf 'System not recognized: %s\n' "$system" >&2
+ exit 1
+ ;;
+esac
+
+install_js_blob='&Tf/6MqAfPUhyEpL6nLzyLoosc/h9qIvG0YM2FxTTYkU=.sha256'
+exec 3<<EOF
+{
+ "preludeBlobs": [
+ {
+ "link": "&2AMoW67mf2KJjmi5Krjkh9klw2vlQtXKbAYwPFKM75M=.sha256",
+ "size": 58477
+ }
+ ],
+ "payloadBlobs": [
+ {
+ "link": "&l2ZcJ6A5MqgbX0JXkVRBBU2dgBdDnM47tJImpF+bOk8=.sha256",
+ "size": 2052334
+ }
+ ],
+ "vfsBlobs": [
+ {
+ "link": "&CDhy5HTLjEpbzxzM5GbYLwRvBBs5sUhOjitYcADoIwo=.sha256",
+ "size": 172228
+ }
+ ],
+ "binName": "patchfoo",
+ "entrypoint": "/snapshot/patchfoo/server.js",
+ "otherEntrypoints": {},
+ "bakes": [],
+ "fileBlobs": {
+ "linux-x64": {
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-x64/libsodium.so.23": [
+ {
+ "link": "&NZls/6/XCnKGgR8G7VYp/HREnqcdzRo1UKzUjA5EUPc=.sha256",
+ "size": 359032
+ }
+ ],
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-x64/node.napi.node": [
+ {
+ "link": "&o5lfdscfDSox8T4tGovJ4LRtuoB/OZQUf/tmp6pxbq0=.sha256",
+ "size": 237040
+ }
+ ]
+ },
+ "linux-arm": {
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm/libsodium.so.23": [
+ {
+ "link": "&WDmqytxRg6+8feJmaYQmj557uyL0pdH9a7fS7tMK81I=.sha256",
+ "size": 271860
+ }
+ ],
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm/node.napi.node": [
+ {
+ "link": "&5zQDiOhdAvDhpJ3kqW61EjF5ahAszqOksA/sslmDq/0=.sha256",
+ "size": 236068
+ }
+ ]
+ },
+ "linux-arm64": {
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm64/libsodium.so.23": [
+ {
+ "link": "&n3I5o8LPUEXuymEkEEhVlMAr6gUDL2geyXadZ2FyTH0=.sha256",
+ "size": 202904
+ }
+ ],
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-arm64/node.napi.node": [
+ {
+ "link": "&k2m6kezfzS63pB95QsnebTVMM7zhebPC+sNlryq2iPc=.sha256",
+ "size": 216320
+ }
+ ]
+ },
+ "linux-ia32": {
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-ia32/libsodium.so.23": [
+ {
+ "link": "&lWEU2O5wovfATth0ubNU6q9avv02ohJGhXyhcBmaDls=.sha256",
+ "size": 435696
+ }
+ ],
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/linux-ia32/node.napi.node": [
+ {
+ "link": "&YT33d/f0xwvHDouy58Y+PoIzrMjUSeuEuB24vYwTaJ8=.sha256",
+ "size": 210972
+ }
+ ]
+ },
+ "darwin-x64": {
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/darwin-x64/libsodium.dylib": [
+ {
+ "link": "&C9yYrmAyE5sRSn/clYUk8oQWPd2H8duE99xGwiNv+ac=.sha256",
+ "size": 413328
+ }
+ ],
+ "/snapshot/patchfoo/node_modules/sodium-native/prebuilds/darwin-x64/node.napi.node": [
+ {
+ "link": "&ypNp9SnCsVyCsp0pccKf3Oc2hGgt1xCxylKF8ki3Jmw=.sha256",
+ "size": 200692
+ }
+ ]
+ }
+ }
+}
+EOF
+
+tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || exit 1
+node_bin="$tmp_dir/ssb-pkg-node-$$"
+install_js="$tmp_dir/ssb-pkg-install-$$"
+
+while ! for id; do
+ echo "$id" >&2
+ curl -sS "$blobs_base$id"
+done | gunzip > "$node_bin"; do sleep 2; done
+chmod +x "$node_bin"
+
+while ! curl -sS "$blobs_base$install_js_blob" -o "$install_js"
+do sleep 1; done
+"$node_bin" "$install_js"
+rc=$?
+rm -rf "$tmp_dir"
+exit $rc