diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-10-27 22:41:55 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-10-27 22:41:55 +0000 |
commit | 17b1505ddd062af322161b82bd29a0eace736115 (patch) | |
tree | e1056f973b6d202173c7d1ed95af0f88959efb1f | |
parent | 729ec6f04840e65f2433e09c50367f40ce38bc29 (diff) | |
download | repoctl-17b1505ddd062af322161b82bd29a0eace736115.tar repoctl-17b1505ddd062af322161b82bd29a0eace736115.tar.gz repoctl-17b1505ddd062af322161b82bd29a0eace736115.tar.bz2 repoctl-17b1505ddd062af322161b82bd29a0eace736115.tar.xz repoctl-17b1505ddd062af322161b82bd29a0eace736115.zip |
add repository as parameter to move_pkg_files and del_pkg_files
-rw-r--r-- | functions | 40 |
1 files changed, 31 insertions, 9 deletions
@@ -173,10 +173,18 @@ function check_distro_section() function move_pkg_files() { - local srcdir="$1" - local destdir="$2" - local srcpkg="$3" - local output="$4" + local src_distrorelease="$1"; shift + local src_section="$1"; shift + local src_sectionrepo="$1"; shift + + local dst_distrorelease="$1"; shift + local dst_section="$1"; shift + local dst_sectionrepo="$1"; shift + + local srcdir="$1"; shift + local destdir="$1"; shift + local srcpkg="$1"; shift + local output="$1"; shift for file in "$srcdir/"*.rpm do @@ -190,9 +198,13 @@ function move_pkg_files() function del_pkg_files() { - local pkgdir="$1" - local srcpkg="$3" - local output="$4" + local distrorelease="$1"; shift + local section="$1"; shift + local sectionrepo="$1"; shift + + local pkgdir="$1"; shift + local srcpkg="$1"; shift + local output="$1"; shift for file in "$pkgdir/"*.rpm do @@ -246,8 +258,18 @@ function move_pkg() for arch in $arches do - move_pkg_files "$distribdir/$src_distrorelease/$arch/media/$src_section/$src_sectionrepo" "$distribdir/$dst_distrorelease/$arch/media/$dst_section/$dst_sectionrepo/" "$srcpkg" "$output" - move_pkg_files "$distribdir/$src_distrorelease/$arch/media/debug/$src_section/$src_sectionrepo" "$distribdir/$dst_distrorelease/$arch/media/debug/$dst_section/$dst_sectionrepo/" "$srcpkg" "$output" + move_pkg_files \ + "$src_distrorelease" "$src_section" "$src_sectionrepo" \ + "$dst_distrorelease" "$dst_section" "$dst_sectionrepo" \ + "$distribdir/$src_distrorelease/$arch/media/$src_section/$src_sectionrepo" \ + "$distribdir/$dst_distrorelease/$arch/media/$dst_section/$dst_sectionrepo/" \ + "$srcpkg" "$output" + move_pkg_files \ + "$src_distrorelease" "$src_section" "$src_sectionrepo" \ + "$dst_distrorelease" "$dst_section" "$dst_sectionrepo" \ + "$distribdir/$src_distrorelease/$arch/media/debug/$src_section/$src_sectionrepo" \ + "$distribdir/$dst_distrorelease/$arch/media/debug/$dst_section/$dst_sectionrepo/" \ + "$srcpkg" "$output" done $dryrun mv -v -f "$distribdir/$src_distrorelease/SRPMS/$src_section/$src_sectionrepo/$srcpkg" "$distribdir/$dst_distrorelease/SRPMS/$dst_section/$dst_sectionrepo/" >> "$output" } |