add -s option to set bip homedir

This commit is contained in:
nohar 2006-07-02 13:24:43 +00:00
parent cd098c85ba
commit dace58405f
2 changed files with 8 additions and 1 deletions

4
bip.1
View File

@ -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.

View File

@ -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]);
}