--- /dev/null
+#!/bin/sh
+
+build_host="ka2"
+build_dir="/scratch/sfr/next"
+
+[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
+[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
+
+[ -n "$1" ] && {
+ build_host="$1"
+ shift
+}
+[ -n "$1" ] && {
+ build_dir="$1"
+ shift
+}
+
+export NEXT_BUILD_HOST="$build_host"
+export NEXT_BUILD_DIR="$build_dir"
+
+ssh "$build_host" /bin/sh <<EOF
+ set -x -e
+ cd "$build_dir/.."
+ rm -rf *config
+ rm -rf next
+ cd linus.git
+ git remote update
+ cd ..
+ git clone -s -l -c gc.auto=0 linus.git next
+EOF