#!/bin/bash GIT_REPOS='next next-history.git quilt next-fixes tools etc mmotm' NEXT_DIR="$HOME/kernels/next" if ! cd "$NEXT_DIR"; then printf '%s: cannot cd to %s\n' "$0" "$NEXT_DIR" 1>&2 exit 1 fi printf 'Updating Linus'\'' tree\n' ssh ozlabs.org 'cd kernels/linus.git; git remote update' for i in $GIT_REPOS; do printf 'Pushing %s\n' "$i" ( cd "$i" && git push --prune bilbo ) if [ "${i%.git}" = "$i" ]; then ssh ozlabs.org 'cd kernels/next/'"$i"'; git reset --hard' fi done { cat <