forked from dlc/bashlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
53 lines (36 loc) · 1.2 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
bashlib 0.5
Installation of bashlib is relatively straightforward:
# gunzip -c bashlib-0.5.tar.gz | tar xf -
# cd bashlib-0.5
# ./configure
# make install
Using bashlib in your CGI scripts is as simple as beginning your
scripts with:
#!/bin/bash
. /path/to/bashlib
# Other stuff
Sourcing bashlib should be the first thing you do in your script;
it reads the environment and pulls out the parameters and cookies.
To get at a named parameter, call:
p=`param p`
In this case, the value of the parameter "p" will end up in p, and
can be accessed normally, through $p.
Cookies work similarly:
session=`cookie session`
will retrieve the cookie named session.
HELPING OUT
Any help is, of course, welcomed. Email me, and we can discuss what
needs to be done. Patches and feature requests are accepted.
TODO
* Better documentation, probably a man page
* Autoconf-based install script
* More functions
* Functions to generate HTML
* Functions to set cookies
* Create URL's
* Better documentation
* Add support for multivalued parameters, either via bash2's arrays
or some other hack
* sed-based templating system (I've started this one, and it's scary!)
AUTHOR
darren chamberlain <[email protected]>