diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-06-26 15:11:15 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-10-07 18:15:03 -0400 |
commit | 331494d4625464b61d81898c34b50a045d2a74d0 (patch) | |
tree | 3ab4701728843bf1e790d45ef814a1854a80820a /db-functions-svn | |
parent | 96db855c1044b397235baccc46cc18e010c97464 (diff) |
Preliminary work to break out svn-specific code.
Introduce "db-functions-$VCS" which will eventually contain all
VCS-specific code, and make this configurable in config.
Move private arch_svn function and svn acl handling here.
(Luke Shumaker: this is a partial cherry pick of commit 3bb6775dea3e6dda58d94e8ef9a19026cb9248a4)
Diffstat (limited to 'db-functions-svn')
-rw-r--r-- | db-functions-svn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db-functions-svn b/db-functions-svn new file mode 100644 index 0000000..fe043a0 --- /dev/null +++ b/db-functions-svn @@ -0,0 +1,15 @@ +#!/hint/bash + +if [[ -n ${SVNUSER} ]]; then + setfacl -m u:"${SVNUSER}":rwx "${WORKDIR}" + setfacl -m d:u:"${USER}":rwx "${WORKDIR}" + setfacl -m d:u:"${SVNUSER}":rwx "${WORKDIR}" +fi + +arch_svn() { + if [[ -z ${SVNUSER} ]]; then + /usr/bin/svn "${@}" + else + sudo -u "${SVNUSER}" -- /usr/bin/svn --username "${USER}" "${@}" + fi +} |