spb/satelliteindex
Public
TypeScript 66.5%
Python 30.9%
JavaScript 1.4%
CSS 0.7%
1#!/bin/bash2# Render deploy/satelliteindex.mld.json with the real admin token and push it to the mld gateway (M1M32:~/dispatch/apps/).3# Usage: deploy/render-manifest.sh [--push]4set -euo pipefail5cd "$(dirname "$0")/.."6TOKEN_FILE=deploy/.admin-token7[ -s "$TOKEN_FILE" ] || { openssl rand -hex 24 > "$TOKEN_FILE"; echo "generated $TOKEN_FILE"; }8TOKEN=$(tr -d '\n' < "$TOKEN_FILE")9mkdir -p deploy/rendered10sed "s/{{ADMIN_TOKEN}}/$TOKEN/g" deploy/satelliteindex.mld.json > deploy/rendered/satelliteindex.json11python3 -c "import json,sys; json.load(open('deploy/rendered/satelliteindex.json')); print('manifest ok')"12if [ "${1:-}" = "--push" ]; then13 scp -q deploy/rendered/satelliteindex.json M1M32:~/dispatch/apps/satelliteindex.json14 ssh M1M32 'chmod 600 ~/dispatch/apps/satelliteindex.json && echo "pushed to M1M32:~/dispatch/apps/satelliteindex.json"'15fi16