]> git.ozlabs.org Git - next-scripts/commitdiff
to_ozlabs: paramaterize things
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 23 Jul 2013 06:04:23 +0000 (16:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 23 Jul 2013 06:04:23 +0000 (16:04 +1000)
to_ozlabs

index 4d477585bc85beab456586d7ae18e8c5d0dd33b5..5421bb7edfc6d7cb6d5883c3c09eef9a5f3ba5af 100755 (executable)
--- a/to_ozlabs
+++ b/to_ozlabs
@@ -1,36 +1,42 @@
 #!/bin/bash
 
+GIT_REPOS="next next-history.git quilt next-fixes tools etc"
+
 cd ~/kernels/next
 
 echo "Updating Linus' tree"
 ssh ozlabs.org "cd kernels/linus.git; git remote update"
 
-echo "Pushing next"
-( cd next; git push bilbo )
-ssh ozlabs.org "cd kernels/next/next; git reset --hard"
-
-echo "Pushing next-history"
-( cd next-history.git; git push bilbo )
-
-echo "Pushing quilt"
-( cd quilt; git push bilbo )
-ssh ozlabs.org "cd kernels/next/quilt; git reset --hard"
-
-echo "Pushing next-fixes"
-( cd next-fixes; git push bilbo )
-ssh ozlabs.org "cd kernels/next/next-fixes; git reset --hard"
-
-echo "Pushing tools"
-( cd tools; git push bilbo )
-ssh ozlabs.org "cd kernels/next/tools; git reset --hard"
-
-rsync -avHP --exclude gitk.cache --exclude 'patch-*-next-2*' \
-       --exclude next-2'*'/ --include '.git/' --include .git/config \
-       --include 'next/.git/rr-cache/' --include 'next/.git/rr-cache/**' \
-       --exclude next/'**' --exclude quilt/'**' --exclude next-fixes/'**' \
-       --exclude next-history.git/'**' --exclude tools/'**' \
-       --delete . ozlabs.org:kernels/next/.
+for i in $GIT_REPOS; do
+       echo "Pushing $i"
+       ( cd $i; git push bilbo )
+       [ "${i%.git}" = "$i" ] &&
+               ssh ozlabs.org "cd kernels/next/$i; git reset --hard"
+done
+
+{
+       cat <<EOF
+- gitk.cache
+- /merge.debug
+- /merge.log
+- /quilt-import.log
+- /akpm-import.log
+- /summ
+- /patch-*-next-2*
+- /next-2*/
++ .git/
++ .git/config
++ /next/.git/rr-cache/
++ /next/.git/rr-cache/**
+EOF
+       for i in $GIT_REPOS; do
+               echo "- $i/**"
+       done
+} | rsync -avHP --include-from - --delete . ozlabs.org:kernels/next/.
 
 ssh ozlabs.org "touch kernels/NEXT-DONE"
 
+# Fix up the git configs so that the next pushes will work
+ssh ozlabs.org 'cd kernels/next; for i in '"$GIT_REPOS"'; do ( cd $i; git config receive.denyCurrentBranch ignore; ); done'
+
 exit 0