diff options
author | Paweł Zuzelski <pawelz@pld-linux.org> | 2010-06-08 16:04:31 +0200 |
---|---|---|
committer | Paweł Zuzelski <pawelz@pld-linux.org> | 2010-06-08 16:04:31 +0200 |
commit | 528da21727fba819d8eef4251d22d91de2c111c9 (patch) | |
tree | 9067fbf0145a1e0e8d805573448d5d9c4c6cb604 /examples/data/scripts/follow.sh | |
parent | 3593d5fcae27ce3d96d3944ee81deab37a1eab77 (diff) |
simplifiy follow.sh.
Now it executes less processes and works a bti faster.
Diffstat (limited to 'examples/data/scripts/follow.sh')
-rwxr-xr-x | examples/data/scripts/follow.sh | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index af9e277..ba59575 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -15,19 +15,7 @@ shift title=$1; shift -echo 'script @scripts_dir/follow.js "@{follow_hint_keys} '$1'"' | socat - unix-connect:$socket - -# Read variable set by script. If it equals XXXEMIT_FORM_ACTIVEXXX emit -# FORM_ACTIVE event. If it equals XXXEMIT_ROOT_ACTIVEXXX emit ROOT_ACTIVE -# event. -rv=$(echo 'js rv' | socat - unix-connect:$socket) - -echo $rv \ - | grep -q XXXEMIT_FORM_ACTIVEXXX \ - && echo 'event FORM_ACTIVE' \ - | socat - unix-connect:$socket - -echo $rv \ - | grep -q XXXRESET_MODEXXX \ - && echo 'set mode =' \ - | socat - unix-connect:$socket +case $(echo 'script @scripts_dir/follow.js "@{follow_hint_keys} '$1'"' | socat - unix-connect:$socket) in + *XXXEMIT_FORM_ACTIVEXXX*) echo 'event FORM_ACTIVE' | socat - unix-connect:$socket ;; + *XXXRESET_MODEXXX*) echo 'set mode=' | socat - unix-connect:$socket ;; +esac |