From dace58405fca4cda67efd5b9c521456e75d051d9 Mon Sep 17 00:00:00 2001 From: nohar Date: Sun, 2 Jul 2006 13:24:43 +0000 Subject: [PATCH] add -s option to set bip homedir --- bip.1 | 4 ++++ src/bip.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bip.1 b/bip.1 index 1dbd4bc..138cbd8 100644 --- a/bip.1 +++ b/bip.1 @@ -23,6 +23,10 @@ Don't daemonize. Log into stderr. Use config_file as the configuration file. If no config file is given, bip will try to open ~/.bip/bip.conf. +.TP +\fB-s\fP homedir +Set bip home directory to homedir instead of $HOME/.bip. + .TP \fB-h\fP Help. diff --git a/src/bip.c b/src/bip.c index 40de8c9..be86641 100644 --- a/src/bip.c +++ b/src/bip.c @@ -902,7 +902,7 @@ int main(int argc, char **argv) conf_global_log_file = stderr; conf_pid_file = NULL; - while ((ch = getopt(argc, argv, "hnf:")) != -1) { + while ((ch = getopt(argc, argv, "hnfs:")) != -1) { switch (ch) { case 'f': confpath = strdup(optarg); @@ -910,6 +910,9 @@ int main(int argc, char **argv) case 'n': conf_daemonize = 0; break; + case 's': + conf_biphome = strdup(optarg); + break; default: usage(argv[0]); }