git ssb

0+

cel-desktop / ssb-pkg



Tree: e1a1630f31c55420ca08a2a8e36296e3c202f1b1

Files: e1a1630f31c55420ca08a2a8e36296e3c202f1b1 / prelude / install.sh

700 bytesRaw
1#!/bin/sh
2{
3blobs_base=${SSB_BLOBS_BASE:-http://localhost:8989/blobs/get/}
4
5system=$(uname -sm) || return 1
6case "$system" in
7%SWITCH_NODE_BLOBS%
8 *)
9 printf 'System not recognized: %s\n' "$system" >&2
10 exit 1
11 ;;
12esac
13
14install_js_blob='%INSTALL_JS_BLOB%'
15exec 3<<EOF
16%SETTINGS%
17EOF
18
19tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || return 1
20node_bin="$tmp_dir/ssb-pkg-node-$$"
21install_js="$tmp_dir/ssb-pkg-install-$$"
22
23while ! for id; do
24 echo "$id" >&2
25 curl -sS "$blobs_base$id"
26done | gunzip > "$node_bin"; do sleep 2; done
27chmod +x "$node_bin"
28
29while ! curl -sS "$blobs_base$install_js_blob" -o "$install_js"
30do sleep 1; done
31"$node_bin" "$install_js"
32rm -rf "$tmp_dir"
33}
34

Built with git-ssb-web