Repository navigation
Expand file tree
/
Copy pathINSTALL
More file actions
60 lines (39 loc) · 1.42 KB
/
Copy pathINSTALL
File metadata and controls
60 lines (39 loc) · 1.42 KB
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
54
55
56
57
58
59
60
bashlib 4
bashlib is a bash library: there is nothing to configure and nothing
to build, the checked-out file is the finished library (it calls no
external tools). To run the test suite:
# make check
To install (the default prefix is /usr/local):
# make install
# make install PREFIX=/usr # or wherever
Packagers can use the usual DESTDIR redirection:
# make install DESTDIR=$RPM_BUILD_ROOT
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
* 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 <dlc@sevenroot.org>