diff options
author | Levente Polyak <anthraxx@archlinux.org> | 2022-06-10 00:57:45 +0200 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2022-06-10 16:51:52 +0200 |
commit | ac222ae00469555269722483a1d936997b220f4b (patch) | |
tree | c82087acd1bee16b80b243f6f30af538289919aa /archrelease.in | |
parent | cde012d25e7b9cb8b459af151c7210f2eddf4763 (diff) | |
download | devtools-ac222ae00469555269722483a1d936997b220f4b.tar.xz |
archrelease: support subdirectories in package directories
We need to support subdirectories for the `keys` directory used to
distribute PGP keys alongside the packaging sources.
This is achieved by using `svn ls` to list the files and directories
in the packaging root and leverage the behavior of `svn copy` to
consider subdirectories inside the root but only copy over files and
directories under the subdirectory that are already tracked by svn.
As a step in between, we now use `svn ls --recursive` to list all
tracked svn files in the current repos directory and remove all tracked
files in the staging area. Hence the `svn copy` in combination with the
`svn rm` will result in a sync behavior from the packaging root to the
repos directory.
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'archrelease.in')
-rw-r--r-- | archrelease.in | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/archrelease.in b/archrelease.in index 252db28..3490ee2 100644 --- a/archrelease.in +++ b/archrelease.in @@ -51,11 +51,6 @@ fi pushd .. >/dev/null mapfile -t known_files < <(svn ls -r HEAD "$trunk") wait $! || die "failed to discover committed files" -for file in "${known_files[@]}"; do - if [[ ${file:(-1)} = '/' ]]; then - die "archrelease: subdirectories are not supported in package directories!" - fi -done # gracefully handle files containing an "@" character known_files=("${known_files[@]/%/@}") @@ -67,7 +62,7 @@ for tag in "$@"; do stat_busy "Copying %s to %s" "${trunk}" "${tag}" if [[ -d repos/$tag ]]; then - mapfile -t trash < <(svn ls "repos/$tag") + mapfile -t trash < <(svn ls --recursive "repos/$tag") wait $! || die "failed to discover existing files" if (( ${#trash[@]} )); then trash=("${trash[@]/#/repos/$tag/}") |