github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jmbr / gnostic

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Rule-based task execution system — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Use gzip instead of bzip2 to produce tarballs. 
jmbr (author)
Tue Aug 07 05:02:34 -0700 2007
commit  76d0fc17d781f48362f76241a40c6db1121c89c2
tree    f1d87c9a20b7eb0df6a9f93ad0d73d12b26f17d3
parent  d181484a795e4dea6c9ed160066fdcc94b8836cd
gnostic /
name age
history
message
file AUTHORS Loading commit data...
file GNUmakefile.in
file INSTALL
file LICENSE
file README
file THANKS
file ast-itor.c
file ast-priv.h
file ast.c
file ast.h
file bootstrap.sh
file configure.ac
file deps.mk
directory doc/
file doxy.cfg.in
file env.c
file env.h
directory examples/
file gnostic.1
file gnostic.5
file gnostic.c
file grammar.y
file hashtab.c
file hashtab.h
file logger.c
file logger.h
file memcheck.sh
file scanner.l
file stack.c
file stack.h
file task-exec.c
file task.c
file task.h
file tasklist.c
file tasklist.h
file taskset-parser.c
file taskset-priv.h
file taskset.c
file taskset.h
file test-ast.c
file test-gnostic.sh
file test-grammar.c
file test-hashtab.c
file test-stack.c
file test-tasklist.c
directory testdata/
file testskeleton.c
file vars.c
file vars.h
file xmemory.c
file xmemory.h
README
gnostic
=======

    gnostic: adjective 1 of knowledge. 2 having special mystic knowledge.
    noun (Gnostic) early Christian heretic claiming mystical knowledge.
    -- Merriam-Webster on-line dictionary.

Overview
--------

gnostic is a program which executes shell scripts according to certain
criteria. It is aimed at applications where there is a need to codify some
types of "recipes" for doing things.

Installation
------------

Read the INSTALL file for detailed instructions. The most straight-forward way
to install gnostic is by executing::

  ./configure
  make
  make install

gnostic doesn't depend on any third-party libraries and it's supposed to
compile and run cleanly on any UNIX-like operating system.

Documentation
-------------

Full API documentation can be generated with doxygen. There's a doxy.cfg file
with some defaults that the users/developers can change to suit their needs.

An user's guide is present (currently as a work-in-progress) in the doc/
subdirectory. There are also two manual pages which are installed by default.

To generate all the documentation type::

  make doc apidoc

Getting started
---------------

The best way to get a feeling of how gnostic works is to try some of the sample
taskfiles present in the examples/ subdirectory. It is very easy to start
writing your own taskfiles specially if you're already familiar with make(1).

One could start trying with::

  $ gnostic examples/environ.gns 
  environ

When gnostic is invoked this way it lists all the tasks present in the given
task file. By convention, the main one will appear at the beginning. In this
example we have only one task: environ. Let's ask gnostic to execute it::

  $ gnostic examples/environ.gns environ
  gnostic: Executing `environ'.
  BASH=/bin/sh
  BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i586-mandrake-linux-gnu")
  BASH_VERSION='2.05b.0(1)-release'
  BROWSER=/usr/bin/mozilla
  .
  .
  .
  USER=rwx
  WINDOW=1
  WINDOWID=12582914
  XAUTHORITY=/home/rwx/.Xauthority
  XMODIFIERS=@im=none
  _=/bin/sh
  gnostic: Task `environ' exited with status 0.
  $

As you can see this is a fairly trivial task. It invokes BASH's builtin command
set(1) to print out the task's environment. But we can use it demonstrate at
least one feature of gnostic: passing parameters::

  $ gnostic examples/environ.gns environ fnord=23 foo=bar
  gnostic: Executing `environ'.
  .
  .
  .
  _=/bin/sh
  fnord=23
  foo=bar
  gnostic: Task `environ' exited with status 0.
  $

The parameters passed become part the environment of the executed task. The
following is a more useful example of tasks and parameters at work::

  $ gnostic examples/netmap.gns ping addr=127.0.0.1 scriptdir=examples 
  gnostic: Executing `ping'.
  gnostic: Executing `ping-requisites'.
  gnostic: Task `ping-requisites' exited with status 0.
  PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
  64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.295 ms
  64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.060 ms
  64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.057 ms
  64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.056 ms
  64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.057 ms

  --- 127.0.0.1 ping statistics ---
  5 packets transmitted, 5 received, 0% packet loss, time 4000ms
  rtt min/avg/max/mdev = 0.056/0.105/0.295/0.095 ms
  gnostic: Task `ping' exited with status 0.
  $

After this step it is advisable to delete the left-over data (perhaps after
taking a look at it) located in /tmp/gnostic and start reading the appropriate
man pages and the rest of the examples.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server