2
* Subversion will populate the user's ~/.subversion/ directory with
3
* default configuration files if the directory does not exist. Some
4
* of these same files are useful to system administrators who want to
5
* put files in /etc/subversion/ to control site-wide configuration.
6
* This program creates a default set of subversion config files in
7
* the current directory.
11
#include <apr_general.h>
12
#include <apr_pools.h>
13
#include <apr_file_io.h>
14
#include <apr_file_info.h>
15
#include <svn_config.h>
18
#define ROOT_DIR "svn-defaults"
21
main(int argc, char *argv[])
29
apr_pool_create(&pool, NULL);
31
apr_file_open_stderr(&fptr, pool);
35
apr_file_printf(fptr, "Usage: %s\n", argv[0]);
36
apr_file_printf(fptr, "Create a set of default config files"
37
"in $PWD/" ROOT_DIR "\n");
41
root = apr_psprintf(pool, "%s/%s", getenv("PWD"), ROOT_DIR);
45
apr_file_printf(fptr, "apr_psprintf failed\n");
49
if (APR_SUCCESS == apr_stat(&finfo, root, 0, pool))
51
apr_file_printf(fptr, "%s exists\n", root);
55
svn_config_ensure(root, pool);