From 0b329d20c64502e3a9e932590f7872e09167d001 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 16 Sep 2023 13:07:18 -0400 Subject: Add host script for initial configuration flow The new installation procedure is to start with ./configure to set your pubkey up for admin access. The initialize script is updated to use an active prompt, since as-is, CTRL-C won't properly terminate the script to cancel. Signed-off-by: Malfurious --- configure | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 configure (limited to 'configure') diff --git a/configure b/configure new file mode 100755 index 0000000..53d8e1c --- /dev/null +++ b/configure @@ -0,0 +1,22 @@ +#!/bin/sh + +usage() { + echo "usage: ./configure " + echo "Please give me your administrator public key, whose filename must" + echo "end in '.pub'. Paths beginning with '~' are not allowed, however" + echo "your shell might pre-expand them." + exit 1 +} + +echo "$1" | grep -Eq '^~' && usage +echo "$1" | grep -Eq '.+\.pub$' || usage + +echo "$1" | grep -Eq '^/' && keypath="$1" || keypath="$PWD/$1" +keyname=$(basename "$keypath") + +docker compose run \ + --build \ + --rm \ + --volume "$keypath:/tmp/$keyname:ro" \ + gitolite \ + /app/initialize.sh "$keyname" -- cgit v1.2.3