FreeBSD/contrib/subversion/subversion/libsvn_repos/repos.c
/* Write a template file for a hook script named SCRIPT_NAME (appending
 * '.tmpl' to that name) in REPOS. Include DESCRIPTION and SCRIPT in the
 * template text.
 */
Write a template file for a hook script named SCRIPT_NAME (appending
'.tmpl' to that name) in REPOS. Include DESCRIPTION and SCRIPT in the
template text.
Write a template file for a hook script named SCRIPT_NAME ( appending ' . tmpl ' to that name ) in REPOS . Include DESCRIPTION and SCRIPT in the template text .
static svn_error_t *
write_hook_template_file(svn_repos_t *repos, const char *script_name,
                         const char *description,
                         const char *script,
                         apr_pool_t *pool)
{
  const char *template_path
    = svn_dirent_join(repos->hook_path,
                      apr_psprintf(pool, "%s%s",
                                   script_name, SVN_REPOS__HOOK_DESC_EXT),
                      pool);
  const char *contents
    = hook_template_text(script_name, description, script, pool);
  SVN_ERR(svn_io_file_create(template_path, contents, pool));
  SVN_ERR(svn_io_set_file_executable(template_path, TRUE, FALSE, pool));
  return SVN_NO_ERROR;
}
static svn_error_t * write_hook_template_file ( svn_repos_t * repos , const char * script_name , const char * description , const char * script , apr_pool_t * pool ) { const char * template_path = svn_dirent_join ( repos -> hook_path , apr_psprintf ( pool , " " , script_name , SVN_REPOS__HOOK_DESC_EXT ) , pool ) ; const char * contents = hook_template_text ( script_name , description , script , pool ) ; SVN_ERR ( svn_io_file_create ( template_path , contents , pool ) ) ; SVN_ERR ( svn_io_set_file_executable ( template_path , TRUE , FALSE , pool ) ) ; return SVN_NO_ERROR ; }
Write a template file for a hook script named SCRIPT_NAME (appending
 '.tmpl' to that name) in REPOS.
Write a template file for a hook script named SCRIPT_NAME ( appending ' . tmpl ' to that name ) in REPOS .