git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / prelude / install.sh

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

Built with git-ssb-web