summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2011-08-09 23:32:52 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2011-08-09 23:32:52 (GMT)
commit5ab1541c3fe8f8cc284a038632bb451f8e3d79de (patch)
treea0b52837ab9d0ab298f0323a728e1f1a81c27324 /abs/core
parent12bdea7405a02ec316e92fa2684d89cd721f8520 (diff)
downloadlinhes_pkgbuild-5ab1541c3fe8f8cc284a038632bb451f8e3d79de.zip
linhes_pkgbuild-5ab1541c3fe8f8cc284a038632bb451f8e3d79de.tar.gz
linhes_pkgbuild-5ab1541c3fe8f8cc284a038632bb451f8e3d79de.tar.bz2
linhes-scripts: fix my boo-boo
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/linhes-scripts/PKGBUILD4
-rw-r--r--abs/core/linhes-scripts/xwin_find.sh488
2 files changed, 73 insertions, 419 deletions
diff --git a/abs/core/linhes-scripts/PKGBUILD b/abs/core/linhes-scripts/PKGBUILD
index 9ebe47c..9c35ee3 100644
--- a/abs/core/linhes-scripts/PKGBUILD
+++ b/abs/core/linhes-scripts/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=linhes-scripts
pkgver=7
-pkgrel=7
+pkgrel=8
pkgdesc="Various scripts that help to make LinHES, LinHES."
arch=('i686' 'x86_64')
license=('GPL2')
@@ -91,4 +91,4 @@ md5sums=('f56985b2d602e11dc1e10d3e7848b2a5'
'df727c98350a64e2171c950bbefc9c5d'
'7b890e7044db38e8d439f67e398af206'
'35693f50939d5827aeabfce8c5dce589'
- 'e93ef4eb6dae27c872c80b22b3356432')
+ 'a94fe6d980f4b810f2e2ae5352084b39')
diff --git a/abs/core/linhes-scripts/xwin_find.sh b/abs/core/linhes-scripts/xwin_find.sh
index 1720c96..35309dd 100644
--- a/abs/core/linhes-scripts/xwin_find.sh
+++ b/abs/core/linhes-scripts/xwin_find.sh
@@ -1,418 +1,72 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<title>LinHES - xwin_find.sh - LinHES</title>
-<meta name="description" content="Redmine" />
-<meta name="keywords" content="issue,bug,tracker" />
-<meta name="csrf-param" content="authenticity_token"/>
-<meta name="csrf-token" content="xrk0pQcBCUKhfVBzGsm4tpd3fnOWzA8BHwE+MrMJfmc="/>
-<link rel='shortcut icon' href='/bugs/favicon.ico?1310384844' />
-<link href="/bugs/themes/jorgebg-redmine-aurora-theme-f004cda/stylesheets/application.css?1303599258" media="all" rel="stylesheet" type="text/css" />
+#!/bin/sh
+#
+# xwin_find [-v|-q] [timeout] window_name_regex
+#
+# Look for a window of the windows full name given by a awk regular
+# expression, and print the windows xwindow ID.
+#
+# If a timeout is given (in seconds)continue to look for the windows ID
+# for this amount of time before returning. (EG default a single search)
+#
+# If no such window is found output nothing, just exit
+#
+# OPTIONS
+# -v verbose, print the full matching xwininfo line on stderr
+# -q do not print windows ID on stdout
+#
+####
+# Anthony Thyssen September 2005
+#
+PROGNAME=`type $0 | awk '{print $3}'` # search for executable on path
+PROGDIR=`dirname $PROGNAME` # extract directory of program
+PROGNAME=`basename $PROGNAME` # base name of program
+Usage() {
+ echo >&2 "$PROGNAME:" "$@"
+ sed >&2 -n '/^###/q; s/^#$/# /; 3s/^#/# Usage:/; 3,$s/^# //p;' \
+ "$PROGDIR/$PROGNAME"
+ exit 10;
+}
+
+timeout=0
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ [0-9]*) timeout=`date +%s`
+ timeout=`expr $timeout + $1 + 1` || Usage
+ ;;
+ -q) QUIET=true ;; # don't print the final window ID, just status
+ -v) VERBOSE=true ;; # output the full xwininfo line on stderr
+
+ --) shift; break ;; # end of user options
+ -*) Usage "Unknown option \"$1\"" ;;
+ *) break ;; # end of user options
+ esac
+ shift # next option
+done
+
+[ $# -lt 1 ] && Usage "Missing window search regex"
+[ $# -gt 1 ] && Usage "Too many arguments."
+
+
+find_win() {
+ # nice added to let it give way to starting processes
+ if [ "$VERBOSE" ]; then
+ line=`nice xwininfo -root -tree | awk '/"'"$1"'":/ {print; exit}'`
+ echo >&2 $line # VERBOSE - xwininfo output
+ echo "$line" | sed 's/ .*//'
+ else
+ nice xwininfo -root -tree | awk '/"'"$1"'":/ {print $1; exit}'
+ fi
+}
+
+while :; do
+ id=`find_win "$1"`
+ if [ "$id" ]; then
+ [ -z "$QUIET" ] && echo $id # the window ID found
+ exit 0;
+ fi
+ [ `date +%s` -ge $timeout ] && break
+done
+
+exit 1 # window was not found
-<script src="/bugs/javascripts/prototype.js?1310384844" type="text/javascript"></script>
-<script src="/bugs/javascripts/effects.js?1310384844" type="text/javascript"></script>
-<script src="/bugs/javascripts/dragdrop.js?1310384844" type="text/javascript"></script>
-<script src="/bugs/javascripts/controls.js?1310384844" type="text/javascript"></script>
-<script src="/bugs/javascripts/application.js?1310384844" type="text/javascript"></script>
-<script type="text/javascript">
-//<![CDATA[
-Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('The current page contains unsaved text that will be lost if you leave this page.'); });
-//]]>
-</script>
-
-<!--[if IE 6]>
- <style type="text/css">
- * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
- body {behavior: url(/bugs/stylesheets/csshover.htc?1310384844);}
- </style>
-<![endif]-->
-
-<!-- page specific tags -->
- <link href="/bugs/stylesheets/scm.css?1310384844" media="screen" rel="stylesheet" type="text/css" /></head>
-<body class="theme-Jorgebg-redmine-aurora-theme-f004cda controller-attachments action-show">
-<div id="wrapper">
-<div id="wrapper2">
-<div id="top-menu">
- <div id="account">
- <ul><li><a href="/bugs/login" class="login">Sign in</a></li>
-<li><a href="/bugs/account/register" class="register">Register</a></li></ul> </div>
-
- <ul><li><a href="/bugs/" class="home">Home</a></li>
-<li><a href="/bugs/projects" class="projects">Projects</a></li>
-<li><a href="/bugs/tab/system_show" class="tab">LinHES Forums</a></li>
-<li><a href="http://www.redmine.org/guide" class="help">Help</a></li></ul></div>
-
-<div id="header">
-
- <div id="quick-search">
- <form action="/bugs/search/index/linhes" method="get">
-
- <a href="/bugs/search/index/linhes" accesskey="4">Search</a>:
- <input accesskey="f" class="small" id="q" name="q" size="20" type="text" />
- </form>
-
- </div>
-
-
- <h1>LinHES</h1>
-
-
- <div id="main-menu">
- <ul><li><a href="/bugs/projects/linhes" class="overview">Overview</a></li>
-<li><a href="/bugs/projects/linhes/activity" class="activity">Activity</a></li>
-<li><a href="/bugs/projects/linhes/roadmap" class="roadmap">Roadmap</a></li>
-<li><a href="/bugs/projects/linhes/issues" class="issues">Issues</a></li>
-<li><a href="/bugs/projects/linhes/news" class="news">News</a></li>
-<li><a href="/bugs/projects/linhes/documents" class="documents">Documents</a></li>
-<li><a href="/bugs/projects/linhes/wiki" class="wiki">Wiki</a></li>
-<li><a href="/bugs/projects/linhes/repository" class="repository">Repository</a></li></ul>
- </div>
-
-</div>
-
-<div class="nosidebar" id="main">
- <div id="sidebar">
-
- </br></br>
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
- <span style="color: rgb(0, 0, 0);"><input name="cmd" value="_s-xclick" type="hidden">
- <input src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" b="" order="0" name="submit" alt="Make payments with PayPal - it's fast, free and sec" height="23" type="image" width="110">
- <input name="encrypted" value="-----BEGIN PKCS7----- MIIHDgYJKoZIhvcNAQcEoIIG/zCCBvsCAQExggEwMIIBLAIBADCBlDCBjjELMAkG A1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQw EgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UE AxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJ Ko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2R8Opr64rwmC+J4uQ6O2unw== -----END PKCS7-----" type="hidden"></span>
- </form>
-
-
-
-</br></br></br>
-<a href="http://www.simerec.com/PCS-2.html?LinHES/">Switch your PC on/off with your IR remote!</a>
- </div>
-
- <div id="content">
-
- <h2>xwin_find.sh</h2>
-
-<div class="attachments">
-<p>xwin_find utility required by idle.sh -
- <span class="author">chael, 01/30/2011 09:57 am</span></p>
-<p><a href="/bugs/attachments/download/569/xwin_find.sh">Download</a> <span class="size">(2 kB)</span></p>
-
-</div>
-&nbsp;
-<div class="autoscroll">
-<table class="filecontent syntaxhl">
-<tbody>
-
-
-<tr><th class="line-num" id="L1"><a href="#L1">1</a></th><td class="line-code"><pre>#!/bin/sh
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L2"><a href="#L2">2</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L3"><a href="#L3">3</a></th><td class="line-code"><pre># xwin_find [-v|-q] [timeout] window_name_regex
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L4"><a href="#L4">4</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L5"><a href="#L5">5</a></th><td class="line-code"><pre># Look for a window of the windows full name given by a awk regular
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L6"><a href="#L6">6</a></th><td class="line-code"><pre># expression, and print the windows xwindow ID.
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L7"><a href="#L7">7</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L8"><a href="#L8">8</a></th><td class="line-code"><pre># If a timeout is given (in seconds)continue to look for the windows ID
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L9"><a href="#L9">9</a></th><td class="line-code"><pre># for this amount of time before returning. (EG default a single search)
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L10"><a href="#L10">10</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L11"><a href="#L11">11</a></th><td class="line-code"><pre># If no such window is found output nothing, just exit
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L12"><a href="#L12">12</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L13"><a href="#L13">13</a></th><td class="line-code"><pre># OPTIONS
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L14"><a href="#L14">14</a></th><td class="line-code"><pre># -v verbose, print the full matching xwininfo line on stderr
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L15"><a href="#L15">15</a></th><td class="line-code"><pre># -q do not print windows ID on stdout
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L16"><a href="#L16">16</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L17"><a href="#L17">17</a></th><td class="line-code"><pre>####
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L18"><a href="#L18">18</a></th><td class="line-code"><pre># Anthony Thyssen September 2005
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L19"><a href="#L19">19</a></th><td class="line-code"><pre>#
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L20"><a href="#L20">20</a></th><td class="line-code"><pre>PROGNAME=`type $0 | awk '{print $3}'` # search for executable on path
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L21"><a href="#L21">21</a></th><td class="line-code"><pre>PROGDIR=`dirname $PROGNAME` # extract directory of program
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L22"><a href="#L22">22</a></th><td class="line-code"><pre>PROGNAME=`basename $PROGNAME` # base name of program
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L23"><a href="#L23">23</a></th><td class="line-code"><pre>Usage() {
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L24"><a href="#L24">24</a></th><td class="line-code"><pre> echo &gt;&amp;2 &quot;$PROGNAME:&quot; &quot;$@&quot;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L25"><a href="#L25">25</a></th><td class="line-code"><pre> sed &gt;&amp;2 -n '/^###/q; s/^#$/# /; 3s/^#/# Usage:/; 3,$s/^# //p;' \
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L26"><a href="#L26">26</a></th><td class="line-code"><pre> &quot;$PROGDIR/$PROGNAME&quot;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L27"><a href="#L27">27</a></th><td class="line-code"><pre> exit 10;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L28"><a href="#L28">28</a></th><td class="line-code"><pre>}
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L29"><a href="#L29">29</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L30"><a href="#L30">30</a></th><td class="line-code"><pre>timeout=0
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L31"><a href="#L31">31</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L32"><a href="#L32">32</a></th><td class="line-code"><pre>while [ $# -gt 0 ]; do
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L33"><a href="#L33">33</a></th><td class="line-code"><pre> case &quot;$1&quot; in
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L34"><a href="#L34">34</a></th><td class="line-code"><pre> [0-9]*) timeout=`date +%s`
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L35"><a href="#L35">35</a></th><td class="line-code"><pre> timeout=`expr $timeout + $1 + 1` || Usage
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L36"><a href="#L36">36</a></th><td class="line-code"><pre> ;;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L37"><a href="#L37">37</a></th><td class="line-code"><pre> -q) QUIET=true ;; # don't print the final window ID, just status
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L38"><a href="#L38">38</a></th><td class="line-code"><pre> -v) VERBOSE=true ;; # output the full xwininfo line on stderr
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L39"><a href="#L39">39</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L40"><a href="#L40">40</a></th><td class="line-code"><pre> --) shift; break ;; # end of user options
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L41"><a href="#L41">41</a></th><td class="line-code"><pre> -*) Usage &quot;Unknown option \&quot;$1\&quot;&quot; ;;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L42"><a href="#L42">42</a></th><td class="line-code"><pre> *) break ;; # end of user options
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L43"><a href="#L43">43</a></th><td class="line-code"><pre> esac
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L44"><a href="#L44">44</a></th><td class="line-code"><pre> shift # next option
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L45"><a href="#L45">45</a></th><td class="line-code"><pre>done
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L46"><a href="#L46">46</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L47"><a href="#L47">47</a></th><td class="line-code"><pre>[ $# -lt 1 ] &amp;&amp; Usage &quot;Missing window search regex&quot;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L48"><a href="#L48">48</a></th><td class="line-code"><pre>[ $# -gt 1 ] &amp;&amp; Usage &quot;Too many arguments.&quot;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L49"><a href="#L49">49</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L50"><a href="#L50">50</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L51"><a href="#L51">51</a></th><td class="line-code"><pre>find_win() {
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L52"><a href="#L52">52</a></th><td class="line-code"><pre> # nice added to let it give way to starting processes
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L53"><a href="#L53">53</a></th><td class="line-code"><pre> if [ &quot;$VERBOSE&quot; ]; then
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L54"><a href="#L54">54</a></th><td class="line-code"><pre> line=`nice xwininfo -root -tree | awk '/&quot;'&quot;$1&quot;'&quot;:/ {print; exit}'`
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L55"><a href="#L55">55</a></th><td class="line-code"><pre> echo &gt;&amp;2 $line # VERBOSE - xwininfo output
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L56"><a href="#L56">56</a></th><td class="line-code"><pre> echo &quot;$line&quot; | sed 's/ .*//'
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L57"><a href="#L57">57</a></th><td class="line-code"><pre> else
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L58"><a href="#L58">58</a></th><td class="line-code"><pre> nice xwininfo -root -tree | awk '/&quot;'&quot;$1&quot;'&quot;:/ {print $1; exit}'
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L59"><a href="#L59">59</a></th><td class="line-code"><pre> fi
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L60"><a href="#L60">60</a></th><td class="line-code"><pre>}
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L61"><a href="#L61">61</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L62"><a href="#L62">62</a></th><td class="line-code"><pre>while :; do
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L63"><a href="#L63">63</a></th><td class="line-code"><pre> id=`find_win &quot;$1&quot;`
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L64"><a href="#L64">64</a></th><td class="line-code"><pre> if [ &quot;$id&quot; ]; then
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L65"><a href="#L65">65</a></th><td class="line-code"><pre> [ -z &quot;$QUIET&quot; ] &amp;&amp; echo $id # the window ID found
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L66"><a href="#L66">66</a></th><td class="line-code"><pre> exit 0;
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L67"><a href="#L67">67</a></th><td class="line-code"><pre> fi
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L68"><a href="#L68">68</a></th><td class="line-code"><pre> [ `date +%s` -ge $timeout ] &amp;&amp; break
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L69"><a href="#L69">69</a></th><td class="line-code"><pre>done
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L70"><a href="#L70">70</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L71"><a href="#L71">71</a></th><td class="line-code"><pre>exit 1 # window was not found
-</pre></td></tr>
-
-
-<tr><th class="line-num" id="L72"><a href="#L72">72</a></th><td class="line-code"><pre>
-</pre></td></tr>
-
-
-</tbody>
-</table>
-</div>
-
-
-
-
-
-
- <div style="clear:both;"></div>
- </div>
-</div>
-
-<div id="ajax-indicator" style="display:none;"><span>Loading...</span></div>
-
-<div id="footer">
- <div class="bgl"><div class="bgr">
- Powered by <a href="http://www.redmine.org/">Redmine</a> &copy; 2006-2011 Jean-Philippe Lang
- </div></div>
-</div>
-</div>
-</div>
-
-</body>
-</html>