Files
MeWeb/tools/gitea/create_repo.sh
T
thepraandClaude Opus 5.5 320936c688
Build / Desktop, server and tools (push) Successful in 1m19s
Release / Every platform, the server, the release (push) Successful in 9m34s
"me-web?" 0.7.0: the name in quotes, copy buttons, and every translation rewritten in plain words
- The name is now always written in quotation marks, each language with its own: “me-web?”, «me-web?», „me-web?“, « me-web? », 「me-web?」. Without them the question mark read as the end of a sentence. In Arabic, Hebrew and the other right-to-left languages the question mark no longer jumps to the wrong side of the name.
- Your addresses, your router, your network, the reverse name, the route and the code of a submission you sent now sit in a small box with a copy button, ready to paste into a message to your provider or anywhere else.
- Every translation except English and Italian was rewritten for people who are not technical: everyday words first, the technical term in brackets, and one word for one thing across the whole app. They are still machine drafts; "Suggest a correction" is welcome in any language.
- A few lines are plainer in English and Italian too: the test servers for calls, and the server in the middle that carries a call when two homes can't connect directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
2026-10-15 22:49:40 +02:00

27 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
GITEA=${GITEA_URL:-https://git.thepra.dev}
ORG=${GITEA_ORG:-Arasaka}
NAME=${1:-MeWeb}
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
cred=$(printf 'protocol=https\nhost=%s\n\n' "${GITEA#https://}" | git credential fill)
user=$(printf '%s\n' "$cred" | sed -n 's/^username=//p')
pass=$(printf '%s\n' "$cred" | sed -n 's/^password=//p')
[ -n "$user" ] && [ -n "$pass" ] || { echo "no stored git credential for $GITEA"; exit 1; }
out=$(mktemp)
trap 'rm -f "$out"' EXIT
body=$(printf '{"name":"%s","private":false,"default_branch":"master","description":"“me-web?”: can you run your own server from here? Checks your connection and device and explains what stands in the way."}' "$NAME")
code=$(curl -s -o "$out" -w '%{http_code}' -u "$user:$pass" -H 'Content-Type: application/json' \
-X POST "$GITEA/api/v1/orgs/$ORG/repos" -d "$body")
case "$code" in
201) echo "created $GITEA/$ORG/$NAME" ;;
409) echo "already exists: $GITEA/$ORG/$NAME" ;;
*) echo "Gitea answered $code:"; cat "$out"; echo; exit 1 ;;
esac
cd "$ROOT"
git remote get-url origin >/dev/null 2>&1 || git remote add origin "$GITEA/$ORG/$NAME.git"
git push -u origin master