Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sovereign-intelligence/blob/main/portable-pack/install # sovereign-intelligence Front door to Drake Stapleton's sovereign stack. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `sovereign-intelligence / portable-pack / install` 38 lines ยท 1650 bytes Raw Blame History 1 #!/bin/sh 2 set -eu 3 umask 077 4 root=$(CDPATH='' cd -P "$(dirname "$0")" && pwd) 5 [ "$(uname -s)/$(uname -m)" = Linux/aarch64 ] || { echo 'This preview requires ARM64 Linux.' >&2; exit 2; } 6 (cd "$root" && sha256sum --quiet -c PACK.sha256) 7 "$root/round40/model" --help >/dev/null 8 parent=$HOME/.local/share/sovereign-intelligence 9 bin=$HOME/.local/bin 10 mkdir -p "$parent" "$bin" 11 exec 9>"$parent/install.lock" 12 flock -x 9 13 id=$(sha256sum "$root/PACK.sha256" | cut -d' ' -f1) 14 dest=$parent/$id 15 if [ -e "$bin/si-pack" ] || [ -L "$bin/si-pack" ]; then 16 [ "$(readlink "$bin/si-pack")" = "$parent/current/si-pack" ] || { echo 'An existing si-pack command belongs to another installation.' >&2; exit 1; } 17 fi 18 if [ -e "$parent/current" ] && [ ! -L "$parent/current" ]; then 19 echo 'The current path is already in use.' >&2; exit 1 20 fi 21 stage=$(mktemp -d "$parent/.staging.XXXXXXXX") 22 trap 'rm -rf -- "$stage"' EXIT 23 if [ -d "$dest" ]; then 24 cmp "$root/PACK.sha256" "$dest/PACK.sha256" 25 (cd "$dest" && sha256sum --quiet -c PACK.sha256) 26 else 27 cp -a -- "$root/." "$stage/payload" 28 (cd "$stage/payload" && sha256sum --quiet -c PACK.sha256) 29 fi 30 git clone --quiet "$root/foundation.bundle" "$stage/foundation" 31 git -C "$stage/foundation" checkout --quiet --detach `8be4c26c3b89bfbe72157344c0e3c76884f55e9e` 32 sh "$stage/foundation/install.sh" 33 if [ ! -d "$dest" ]; then mv -T "$stage/payload" "$dest"; fi 34 ln -s "$id" "$stage/current" 35 mv -Tf "$stage/current" "$parent/current" 36 if [ ! -L "$bin/si-pack" ]; then ln -s "$parent/current/si-pack" "$bin/si-pack"; fi 37 "$bin/si-pack" verify 38 printf 'Installed %s\nRun %s/demo using: %s demo\n' "$id" "$dest/round40" "$bin/si-pack"