]> git.ozlabs.org Git - next-scripts/blob - setup_build
move the setup_build script to here from the build machine
[next-scripts] / setup_build
1 #!/bin/sh
2
3 build_host="ka2"
4 build_dir="/scratch/sfr/next"
5
6 [ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
7 [ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
8
9 [ -n "$1" ] && {
10         build_host="$1"
11         shift
12 }
13 [ -n "$1" ] && {
14         build_dir="$1"
15         shift
16 }
17
18 export NEXT_BUILD_HOST="$build_host"
19 export NEXT_BUILD_DIR="$build_dir"
20
21 ssh "$build_host" /bin/sh <<EOF
22         set -x -e
23         cd "$build_dir/.."
24         rm -rf *config
25         rm -rf next
26         cd linus.git
27         git remote update
28         cd ..
29         git clone -s -l -c gc.auto=0 linus.git next
30 EOF