]> git.ozlabs.org Git - next-scripts/blobdiff - to_ozlabs
do_build: consolidate failure action
[next-scripts] / to_ozlabs
index e1d30c801d0b9e985476de761b7d3228a74564c7..5b0a440fc4cfea3fc7e95880cd456b61fa53bfaa 100755 (executable)
--- a/to_ozlabs
+++ b/to_ozlabs
@@ -1,43 +1,26 @@
 #!/bin/bash
 
-GIT_REPOS="next next-history.git quilt next-fixes tools etc mmotm"
+GIT_REPOS='next  next-fixes'
 
-cd ~/kernels/next
+NEXT_DIR="$HOME/kernels/next"
 
-echo "Updating Linus' tree"
-ssh ozlabs.org "cd kernels/linus.git; git remote update"
+if ! cd "$NEXT_DIR"; then
+       printf '%s: cannot cd to %s\n' "$0" "$NEXT_DIR" 1>&2
+       exit 1
+fi
 
-for i in $GIT_REPOS; do
-       echo "Pushing $i"
-       ( cd $i; git push --prune bilbo )
-       [ "${i%.git}" = "$i" ] &&
-               ssh ozlabs.org "cd kernels/next/$i; git reset --hard"
-done
+printf 'Updating Linus'\'' tree\n'
+ssh ozlabs.org 'cd kernels/linus.git; git remote update'
 
-{
-       cat <<EOF
+cat <<EOF | rsync -avHP --open-noatime --include-from - --delete . ozlabs.org:kernels/next/.
 - gitk.cache
 - /merge.debug
 - /merge.log
-- /akpm-import.log
 - /summ
 - /patch-*-next-2*
 - /next-2*/
-+ .git/
-+ .git/config
-+ .git/hooks
-+ .git/hooks/**
-+ /next/.git/rr-cache/
-+ /next/.git/rr-cache/**
 EOF
-       for i in $GIT_REPOS; do
-               echo "- $i/**"
-       done
-} | rsync -avHP --open-noatime --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'
+ssh ozlabs.org 'touch kernels/NEXT-DONE'
 
 exit 0