From abc672cd95713824d85a5e465dfd4e34bbc57bfb Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 25 Nov 2008 23:54:39 -0500 Subject: [PATCH] Applescript for Mac users of kdo to open a tab for each server and connect svn path=/trunk/scripts/; revision=1785 --- osx-update.applescript | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 osx-update.applescript diff --git a/osx-update.applescript b/osx-update.applescript new file mode 100644 index 0000000..f749cb9 --- /dev/null +++ b/osx-update.applescript @@ -0,0 +1,18 @@ +set hosts to {"citadel-station.mit.edu", "aperture-science.mit.edu", "shadow-moses.mit.edu", "arklay-mansion.mit.edu", "xvm.mit.edu", "xvm-remote.mit.edu", "xvm-console.mit.edu"} + +tell application "Terminal" + activate + tell application "System Events" to tell process "Terminal" to keystroke "n" using command down + + set onFirst to true + repeat with host in hosts + if onFirst is true then + set onFirst to false + do script with command "kdo ${ATHENA_USER:-$USER}/root /dev/null" in selected tab of the first window + else + tell application "System Events" to tell process "Terminal" to keystroke "t" using command down + end if + do script with command "kdo ${ATHENA_USER:-$USER}/root ssh -o GSSAPIDelegateCredentials=no root@" & host in selected tab of the front window + do script with command "aptitude update && aptitude dist-upgrade --without-recommends" in selected tab of the front window + end repeat +end tell -- 1.7.9.5