summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2024-05-03 21:08:17 +0100
committerDmitry Ilvokhin <d@ilvokhin.com>2024-05-03 21:08:17 +0100
commitfd2096ce03883f3b3fa379c2c59d46d30f874050 (patch)
tree6b6fbb8467126533d3c31391d13de0252f8356c6
parent51099dc898e4149f88a3211d0ef331a062a1a490 (diff)
downloadinfra-fd2096ce03883f3b3fa379c2c59d46d30f874050.tar.gz
infra-fd2096ce03883f3b3fa379c2c59d46d30f874050.tar.bz2
infra-fd2096ce03883f3b3fa379c2c59d46d30f874050.zip
Init repositories as private by default
-rwxr-xr-xroles/gitserver/files/init-git-repo.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/gitserver/files/init-git-repo.sh b/roles/gitserver/files/init-git-repo.sh
index 881ee55..15aa8c4 100755
--- a/roles/gitserver/files/init-git-repo.sh
+++ b/roles/gitserver/files/init-git-repo.sh
@@ -2,17 +2,17 @@
# Usage examples
#
-# Init private repository and mirror it to github.
-# ./init-git-repo.sh --private --mirror repo.git
+# Init public repository and mirror it to github.
+# ./init-git-repo.sh --public --mirror repo.git
-private=0
+public=0
mirror=0
repo=""
while [[ $# -gt 0 ]]; do
case $1 in
- -p|--private)
- private=1
+ -p|--public)
+ public=1
shift
;;
-m|--mirror)
@@ -39,7 +39,7 @@ mkdir $repo
cd $repo
git init --bare
-if [ $private -eq 0 ]; then
+if [ $public -eq 1 ]; then
touch git-daemon-export-ok
fi