From 822d0a1478bfbca5966df0194f90ad35499420ca Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 8 Mar 2024 15:40:15 +0000 Subject: [PATCH] update_ebuilds: Fix support for rsync of eclass For eclasses we need to skip the mkdir and trailing slash. Signed-off-by: Jeremi Piotrowski --- update_ebuilds | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/update_ebuilds b/update_ebuilds index 96aafba647..07eab2f9c4 100755 --- a/update_ebuilds +++ b/update_ebuilds @@ -57,8 +57,13 @@ for pkg in "$@"; do if [[ "$FLAGS_portage" == rsync ]]; then FLAGS_portage="${FLAGS_rsync}" fi - mkdir -p "$pkg" - rsync $RSYNC_OPTS -v --exclude CVS "$FLAGS_portage/$pkg/" "$pkg" + if [[ "$pkg" =~ "eclass/"* ]]; then + slash= + else + slash="/" + mkdir -p "$pkg" + fi + rsync $RSYNC_OPTS -v --exclude CVS "$FLAGS_portage/$pkg${slash}" "$pkg" fi # Make sure we don't change the repo name to 'gentoo'