Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdd script to create repository with default values - stagit - static git page…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 09a04a8ab8624322a3dd79cedcdb8155f672c6d6
parent 8dd7a4f41b2bdf83d03d48833d70cf20e5d66d54
Author: Anders Damsgaard <[email protected]>
Date: Thu, 2 Jan 2020 22:14:59 +0100
Add script to create repository with default values
Diffstat:
A create-repo.sh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/create-repo.sh b/create-repo.sh
t@@ -0,0 +1,26 @@
+#!/bin/sh
+set -eu
+
+# configuration
+repodir="$HOME/src"
+default_owner="Anders Damsgaard"
+giturl="git://src.adamsgaard.dk"
+
+[ $# -lt 1 ] && (echo "usage: $0 repo_name" && exit 1)
+
+curdir="$(pwd)"
+cd "$repodir"
+for r in "$@"; do
+ git init --bare "$r"
+ printf "description for $r: "
+ read -r REPLY
+ echo "$REPLY" > "$r"/description
+ printf "owner [$default_owner]: "
+ read -r REPLY
+ echo "${REPLY:-$default_owner}" > "$r"/owner
+ ln -s ../../post-receive.sh "$r"/hooks/post-receive
+ echo "${giturl}/${r}" > "$r"/url
+ touch "$r"/git-daemon-export-ok
+done
+
+cd "$curdir"
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.