]> git.ozlabs.org Git - next-scripts/blobdiff - do_revert
automate deleting of files
[next-scripts] / do_revert
index 965f27a86f2fca0a4f801630d465b543edc8b82b..d5e585dd3cc2a61e97f7c4091251f445fc0ac55d 100755 (executable)
--- a/do_revert
+++ b/do_revert
@@ -1,11 +1,5 @@
 #!/bin/bash
 
-LOG_FILE="../merge.log"
-build_host="ka2"
-build_dir="/scratch/sfr/next"
-build_cmd="bin/build_next"
-[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
-[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
 
 no_build=false
 [ "$1" = "-n" ] && {
@@ -16,17 +10,7 @@ no_build=false
 rev=$1
 shift
 
-[ -n "$1" ] && {
-       build_host="$1"
-       shift
-}
-[ -n "$1" ] && {
-       build_dir="$1"
-       shift
-}
-
-export NEXT_BUILD_HOST="$build_host"
-export NEXT_BUILD_DIR="$build_dir"
+. "$(dirname $0)/common.sh"
 
 log()
 {
@@ -48,7 +32,7 @@ git push -f "$build_host":"$build_dir" master:refs/heads/next || {
        echo git push failed 1>&2
        bash -i || exit
 }
-ssh "$build_host" "$build_cmd" || {
+"$bin_dir/do_build" || {
        echo Build failed 1>&2
        bash -i || exit
 }