]> git.ozlabs.org Git - next-scripts/blobdiff - do_revert
change some style
[next-scripts] / do_revert
index f67929018b0f00d09a170757f191004a3704ec0f..f56960a6288c8c3eda81b732c5eca9cc911e02c9 100755 (executable)
--- a/do_revert
+++ b/do_revert
@@ -1,9 +1,5 @@
 #!/bin/bash
 
-LOG_FILE="../merge.log"
-build_host="ka2"
-build_dir="/scratch/sfr/next"
-build_cmd="bin/build_next"
 
 no_build=false
 [ "$1" = "-n" ] && {
@@ -14,14 +10,7 @@ no_build=false
 rev=$1
 shift
 
-[ -n "$1" ] && {
-       build_host="$1"
-       shift
-}
-[ -n "$1" ] && {
-       build_dir="$1"
-       shift
-}
+. "$(dirname $0)/common.sh"
 
 log()
 {
@@ -39,11 +28,11 @@ GIT_EDITOR=: execute git revert $rev || exit 1
 
 $no_build && exit 0
 
-git push -f "$build_host":"$build_dir" master:refs/heads/next || {
+git push -f "${build_host}${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
 }