[cig-commits] r15978 - doc/geodynamics.org/benchmarks/trunk
luis at geodynamics.org
luis at geodynamics.org
Mon Nov 16 14:49:15 PST 2009
Author: luis
Date: 2009-11-16 14:49:13 -0800 (Mon, 16 Nov 2009)
New Revision: 15978
Added:
doc/geodynamics.org/benchmarks/trunk/reload-browser.scpt
doc/geodynamics.org/benchmarks/trunk/reload-browser.sh
Removed:
doc/geodynamics.org/benchmarks/trunk/reload-firefox.scpt
doc/geodynamics.org/benchmarks/trunk/reload-firefox.sh
Modified:
doc/geodynamics.org/benchmarks/trunk/watcher.c
Log:
Changed name of reload script.
It would be nice to also call the reload-browser
AppleScript on Opera and Safari, not just Firefox.
With this name change, we only have to modify
the *.scpt file.
Copied: doc/geodynamics.org/benchmarks/trunk/reload-browser.scpt (from rev 15977, doc/geodynamics.org/benchmarks/trunk/reload-firefox.scpt)
===================================================================
--- doc/geodynamics.org/benchmarks/trunk/reload-browser.scpt (rev 0)
+++ doc/geodynamics.org/benchmarks/trunk/reload-browser.scpt 2009-11-16 22:49:13 UTC (rev 15978)
@@ -0,0 +1,22 @@
+-- http://forums.macosxhints.com/showthread.php?t=36025
+-- http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
+
+on run argv
+ if argv is equal to {} then
+ tell application "Firefox"
+ activate
+ tell application "System Events"
+ tell process "Firefox" to keystroke "r" using {command down}
+ end tell
+ end tell
+ else
+ set theUrl to (item 1 of argv)
+ tell application "Firefox" to activate
+ do shell script "open -a Firefox " & theUrl
+ end if
+ delay 1
+ -- tell application "MacVim" to activate
+ -- tell application "Emacs" to activate
+ tell application "System Events" to keystroke tab using {command down}
+end run
+
Added: doc/geodynamics.org/benchmarks/trunk/reload-browser.sh
===================================================================
--- doc/geodynamics.org/benchmarks/trunk/reload-browser.sh (rev 0)
+++ doc/geodynamics.org/benchmarks/trunk/reload-browser.sh 2009-11-16 22:49:13 UTC (rev 15978)
@@ -0,0 +1,2 @@
+#!/bin/bash
+osascript ./reload-browser.scpt $* 2>/dev/null
Property changes on: doc/geodynamics.org/benchmarks/trunk/reload-browser.sh
___________________________________________________________________
Name: svn:executable
+ *
Deleted: doc/geodynamics.org/benchmarks/trunk/reload-firefox.scpt
===================================================================
--- doc/geodynamics.org/benchmarks/trunk/reload-firefox.scpt 2009-11-16 22:49:05 UTC (rev 15977)
+++ doc/geodynamics.org/benchmarks/trunk/reload-firefox.scpt 2009-11-16 22:49:13 UTC (rev 15978)
@@ -1,22 +0,0 @@
--- http://forums.macosxhints.com/showthread.php?t=36025
--- http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
-
-on run argv
- if argv is equal to {} then
- tell application "Firefox"
- activate
- tell application "System Events"
- tell process "Firefox" to keystroke "r" using {command down}
- end tell
- end tell
- else
- set theUrl to (item 1 of argv)
- tell application "Firefox" to activate
- do shell script "open -a Firefox " & theUrl
- end if
- delay 1
- -- tell application "MacVim" to activate
- -- tell application "Emacs" to activate
- tell application "System Events" to keystroke tab using {command down}
-end run
-
Deleted: doc/geodynamics.org/benchmarks/trunk/reload-firefox.sh
===================================================================
--- doc/geodynamics.org/benchmarks/trunk/reload-firefox.sh 2009-11-16 22:49:05 UTC (rev 15977)
+++ doc/geodynamics.org/benchmarks/trunk/reload-firefox.sh 2009-11-16 22:49:13 UTC (rev 15978)
@@ -1,2 +0,0 @@
-#!/bin/bash
-osascript ./reload-firefox.scpt $* 2>/dev/null
Modified: doc/geodynamics.org/benchmarks/trunk/watcher.c
===================================================================
--- doc/geodynamics.org/benchmarks/trunk/watcher.c 2009-11-16 22:49:05 UTC (rev 15977)
+++ doc/geodynamics.org/benchmarks/trunk/watcher.c 2009-11-16 22:49:13 UTC (rev 15978)
@@ -273,12 +273,12 @@
/* have we reloaded this .html file before? */
if (strncmp(loaded, html, sizeof(html)) == 0)
{
- system("./reload-firefox.sh");
+ system("./reload-browser.sh");
}
else
{
char cmd[1024];
- snprintf(cmd, sizeof(cmd), "./reload-firefox.sh %s", html);
+ snprintf(cmd, sizeof(cmd), "./reload-browser.sh %s", html);
system(cmd);
// remember what we've reloaded last
More information about the CIG-COMMITS
mailing list