diff --git a/bin/create-on-github.py b/bin/create-on-github.py old mode 100755 new mode 100644 diff --git a/bin/force-sync-github.sh b/bin/force-sync-github.sh old mode 100755 new mode 100644 index d51c946..a54800b --- a/bin/force-sync-github.sh +++ b/bin/force-sync-github.sh @@ -1,26 +1,26 @@ repopath=$1 mgmtdir="/home/git/repo-management/" cd $repopath -for line in $( find repositories/ -maxdepth 1 -mindepth 1 -type d | grep ".git$" | sed -e "s/repositories\///g" ); do +for line in $( find -mindepth 1 -maxdepth 1 -type d -name "*.git" ); do cd $repopath/$line/ currpath=$(pwd) urlpath=${currpath#/srv/git/repositories/} reponame=${urlpath%.git} # Gitolite-admin is private, skip it if [[ "$urlpath" == "gitolite-admin.git" ]]; then continue fi # Build the remote URL up remoteurl="git@github.com:kde/$reponame" # Make sure the repo exists on Github python $mgmtdir/bin/create-on-github.py "$reponame" "/srv/git/repositories/$urlpath" # Now we push it up there python $mgmtdir/helpers/update-repo-mirror.py "$reponame" "$remoteurl" # To avoid DoSing them, we now wait 30 seconds sleep 2s done diff --git a/bin/sync-to-github.sh b/bin/sync-to-github.sh old mode 100755 new mode 100644