From: Martin Mares Date: Fri, 23 Aug 2002 08:30:45 +0000 (+0000) Subject: Moved shell script support commands to lib/shell. X-Git-Tag: holmes-import~1359 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2a64fd8ad0419220eccfcde539ed1791138ef942;p=libucw.git Moved shell script support commands to lib/shell. --- diff --git a/lib/Makefile b/lib/Makefile index 631a7437..32e8a2ae 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -23,3 +23,6 @@ obj/lib/lfs-test: obj/lib/lfs-test.o obj/lib/libsh.a obj/lib/regex-test: obj/lib/regex-test.o obj/lib/libsh.a obj/lib/hash-test: obj/lib/hash-test.o obj/lib/libsh.a obj/lib/str-test: obj/lib/str-test.o obj/lib/libsh.a + +include lib/perl/Makefile +include lib/shell/Makefile diff --git a/lib/shell/Makefile b/lib/shell/Makefile new file mode 100644 index 00000000..14462f43 --- /dev/null +++ b/lib/shell/Makefile @@ -0,0 +1,7 @@ +# Support routines for shell scripts + +DIRS+=lib/shell +PROGS+=obj/lib/shell/config obj/lib/shell/logger + +obj/lib/shell/config: obj/lib/shell/config.o obj/lib/libsh.a +obj/lib/shell/logger: obj/lib/shell/logger.o obj/lib/libsh.a diff --git a/lib/shell/config.c b/lib/shell/config.c new file mode 100644 index 00000000..f0fd32c8 --- /dev/null +++ b/lib/shell/config.c @@ -0,0 +1,78 @@ +/* + * Sherlock Library -- Shell Interface to Configuration Files + * + * (c) 2002 Martin Mares + * + * Once we were using this beautiful Shell version, but it turned out + * that it doesn't work with nested config files: + * + * eval `sed +#include +#include + +static void +help(void) +{ + die("Usage: config [-C] [-S
.