scriptcmd.jar

Description
provides commands that run a OSCAR shell script with the ShellService.
For more details on how to use this bundle, refer to the /doc/readme.html file embedded in the bundle jarfile.

Contributors

License
Library GNU Public License

Services

Properties

Requirements

  • org.ungoverned.osgi.service.shell

  • List of added commands

    # [<any comment>]      - useful to comment scripts
    // [<any comment>]     - useful to comment scripts
    rem [<any comment>]    - useful to comment scripts
    echo <msg>             - echo a message
    gc                     - invoke garbage collection
    properties             - list the bundle and system properties
    run [-help]            - run a script downloaded from a url
    wait <seconds>         - wait for seconds
    waitfor [help|bundle|package|class|service|socket|url]
                           - wait for events in the framework
    

    Download

    Build

    1. configure the common.properties if necessary
    2. configure the project.properties if necessary
    3. build with ant

    Settings
    None

    Run the demo
    To run the demo of this bundle, enter the following commands in the OSCAR shell

    -> start http://www-adele.imag.fr/~donsez/dev/osgi/scriptcmd/scriptcmd.jar
    -> gc
    -> run -help
    -> run -s -e -p http://www-adele.imag.fr/~donsez/dev/osgi/script/testscriptcmd.txt
    -> run file:Z:public_html\dev\osgi\script\testscriptcmd.txt
    
    -> waitfor service -timeout 10 (objectClass=org.ungoverned.*)
    a service matching (objectClass=org.ungoverned.*) is available
    -> waitfor service -timeout 10 (objectClass=foo.*)
    no service matching (objectClass=foo.*) are available after a 10 seconds wait
    -> waitfor class -timeout 10 fr.imag.adele.bundle.hello.HelloService
    class fr.imag.adele.bundle.hello.HelloService is available
    -> waitfor class -timeout 10 foo.Bar
    class foo.Bar is not available after a 10 seconds wait
    -> waitfor bundle -timeout 10 4 STOP
    -> waitfor package -timeout 10 toto
    -> waitfor socket -timeout 60 localhost 8080 5
    -> waitfor url -timeout 60 http://www-adele.imag.fr/~donsez/ 1
    

    Typical Usages

  • demo
  • Tested gateways

    Versions history

    TODO (contributions are welcome)