#!/bin/sh # Flint — install a hub or a bot: # # curl -fsSL https://get.flint2.rocks | sudo bash # # This small script fetches the installer and runs it with your terminal, so it can guide you: piped into # bash, the installer's own input would be this pipe, and a dialog cannot ask anything on a pipe. The only # thing you type is your licence; every other answer has a default you can take with Enter. # Flags pass through for an unattended install: curl -fsSL https://get.flint2.rocks | sudo bash -s -- --help # # Everything is inside main(), called on the last line, so bash has read the whole script before it runs. main() { set -eu installer="https://get.flint2.rocks/install/flintng-v0.10.0/get-flintng.sh" if [ "$(id -u)" != 0 ]; then echo "The installer puts a certificate where Docker reads it and needs root. Run:" >&2 echo " curl -fsSL https://get.flint2.rocks | sudo bash" >&2 exit 1 fi command -v curl >/dev/null 2>&1 || { echo "curl is required" >&2; exit 1; } command -v bash >/dev/null 2>&1 || { echo "bash is required" >&2; exit 1; } tmp="$(mktemp /tmp/get-flint.XXXXXX)" trap 'rm -f "$tmp"' EXIT curl -fsSL "$installer" -o "$tmp" || { echo "could not download the installer from $installer" >&2; exit 1; } if [ -t 1 ] && { : /dev/null; then bash "$tmp" "$@"