X-Git-Url: https://oss.titaniummirror.com/gitweb?p=git-utils.git;a=blobdiff_plain;f=git-push-public;fp=git-push-public;h=0000000000000000000000000000000000000000;hp=4a190dcd2c40185647829266d7d58cc4c99b102e;hb=1dc41fbf298952bc686347d66d695e0446a1dac4;hpb=2650ac381e7604c5073f7acaff43169ae6bdc1d2 diff --git a/git-push-public b/git-push-public deleted file mode 100755 index 4a190dc..0000000 --- a/git-push-public +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# git-push-public -# -# Push changes from local git repositories marked as public, via the -# git-daemon-export-ok flag, to the public server. - -LOCALBASE=/var/lib/git -PUBLICBASE=/var/cache/git -PUBLICSERVER=oss.titaniummirror.com - -echo "Updating remote public repositories" -cd $LOCALBASE -for path in $(find . -name git-daemon-export-ok); do - repo="${path/\/git-daemon-export-ok/}" - repo="${repo/.\//}" - echo "Repository $repo" - if ! ssh $PUBLICSERVER test -d $PUBLICBASE/$repo ; then - # Repo does not exist on public server, so create it - echo "Creating repository $repo on remote" - ssh $PUBLICSERVER git --git-dir=$PUBLICBASE/$repo init --bare - ssh $PUBLICSERVER touch $PUBLICBASE/$repo/git-daemon-export-ok - scp $repo/description $PUBLICSERVER:$PUBLICBASE/$repo/ - ssh $PUBLICSERVER "echo \"git://$PUBLICSERVER/$repo\" \ - > $PUBLICBASE/$repo/cloneurl" - fi - git --git-dir=$repo push --mirror $PUBLICSERVER:$PUBLICBASE/$repo -done