From f697b300cc0b421b196193c090df54a121b1d398 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Jan 2016 18:01:13 +0200 Subject: Add script for mirroring, update creation script to support --- server/mkrepo.sh | 63 -------------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100755 server/mkrepo.sh (limited to 'server/mkrepo.sh') diff --git a/server/mkrepo.sh b/server/mkrepo.sh deleted file mode 100755 index adf48fa..0000000 --- a/server/mkrepo.sh +++ /dev/null @@ -1,63 +0,0 @@ -#! /usr/bin/env bash - -# Create remote git repository (on the server). You must run this script -# from the directory where you want the repository to be created. -# -# Usage: mkrepo.sh [] -# -# --private make the repository private -# -# Note: if without the .git suffix. -# -trap 'exit 1' ERR - -function error () -{ - echo "$*" 1>&2 -} - -public=y - -while [ $# -gt 0 ]; do - case $1 in - --private) - public=n - shift - ;; - -*) - error "unknown option: $1" - exit 1 - ;; - *) - break - ;; - esac -done - -if [ "$1" = "" ]; then - error "repository name expected" - exit 1 -fi - -r=$1.git - -mkdir $r -chgrp scm $r -git --bare init --shared=all $r -error "Enter project description (one line; or edit $r/descrition later)" -error "Hit Ctrl-D when done" -cat >$r/description -chgrp -R scm $r - -if [ "$public" = "y" ]; then - f=$r/git-daemon-export-ok - touch $f - chgrp scm $f - chmod g+w $f -else - # Disable raw HTTP access to this directory. - # - echo "deny from all" >$r/.htaccess -fi - -mv $r/hooks/post-update.sample $r/hooks/post-update -- cgit v1.1