]> git.ozlabs.org Git - next-scripts/commitdiff
move the setup_build script to here from the build machine
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 20 May 2013 03:20:00 +0000 (13:20 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 20 May 2013 03:20:00 +0000 (13:20 +1000)
setup_build [new file with mode: 0755]

diff --git a/setup_build b/setup_build
new file mode 100755 (executable)
index 0000000..85a8986
--- /dev/null
@@ -0,0 +1,30 @@
+#!/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