[Assorted-commits] SF.net SVN: assorted:[1322] ydb/trunk/tools/test.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-22 09:08:46
|
Revision: 1322 http://assorted.svn.sourceforge.net/assorted/?rev=1322&view=rev Author: yangzhang Date: 2009-03-22 09:08:37 +0000 (Sun, 22 Mar 2009) Log Message: ----------- - added user setting - made locking functions tolerate missing common.bash - using new custom clamp - general clean-up/tweaks - added node-setup-shell-tools() Modified Paths: -------------- ydb/trunk/tools/test.bash Modified: ydb/trunk/tools/test.bash =================================================================== --- ydb/trunk/tools/test.bash 2009-03-22 09:06:24 UTC (rev 1321) +++ ydb/trunk/tools/test.bash 2009-03-22 09:08:37 UTC (rev 1322) @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o errexit -o nounset -if [[ "$1" != node-init-setup ]] +if [[ "$1" != node-init-setup && "$1" != node-islocked && "$1" != node-lock && "$1" != node-unlock ]] then . common.bash || exit 1 fi @@ -21,6 +21,12 @@ then hosts="$( seq $range | sed 's/^/farm/' )" fi hosts="$( echo -n $hosts )" + if [[ "${user:-}" ]] ; then + for host in $hosts + do rhosts="${rhosts:-} $user@$host" + done + hosts="$rhosts" + fi fi } @@ -66,7 +72,7 @@ remote() { local host="$1" shift - scp -q "$(dirname "$0")/$script" "$host:" + scp -q "$0" "$host:" tagssh "$host" "remote=1 ./$script" "$@" } @@ -84,7 +90,7 @@ parremote() { export hosts range - parhosts "./$script" remote ^ "$@" + parhosts "$0" remote ^ "$@" } hostargs() { @@ -108,14 +114,14 @@ node-unlock() { check-remote sudo su - -c ' - sed -i "/^AllowUsers root yang$/ d" /etc/ssh/sshd_config && + sed -i "/^AllowUsers/ d" /etc/ssh/sshd_config && /etc/init.d/ssh restart ' } node-islocked() { check-remote - sudo grep '^AllowUsers root yang$' /etc/ssh/sshd_config + sudo grep '^AllowUsers' /etc/ssh/sshd_config } lock() { parremote node-lock ; } @@ -191,17 +197,21 @@ node-setup-clamp() { check-remote - cd /tmp/ - tar xzf clamp_053_src.tar.gz - cd clamp_053/ - chmod u+w * - patch -p1 < /tmp/clamp.patch - make -s clamp + svn up -q ~/work/assorted/clamp/ + make -sC ~/work/assorted/clamp/trunk/src/ clean all mkdir -p ~/.local/pkg/clamp/bin/ - mv clamp ~/.local/pkg/clamp/bin/ + ln -sf ~/work/assorted/clamp/trunk/src/clamp ~/.local/pkg/clamp/bin/ refresh-local } +node-setup-shell-tools() { + check-remote + svn up -q ~/work/assorted/ + cd ~/work/assorted/shell-tools/trunk/ + ./setup.bash -d -p ~/.local/pkg/shell-tools/ + refresh-local +} + node-setup-gtest() { check-remote toast --quiet arm googletest @@ -219,7 +229,7 @@ refresh-local cd ~/ydb/src make clean - PPROF=1 OPT=1 make WTF= ydb + PPROF=1 OPT=1 make WTF= ydb DISTCC= } node-setup-cog() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |