aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-11-21 19:55:03 +0000
committerNicolas Vigier <boklm@mageia.org>2011-11-21 19:55:03 +0000
commit75a71063814a543336e6b26f378c69d107d563fa (patch)
tree380f45b2a768d305e754d80064ad1bd8b6e83efc
parent33b0276c95e85218c381b5c4edc66f787e1f72ce (diff)
downloadrepoctl-75a71063814a543336e6b26f378c69d107d563fa.tar
repoctl-75a71063814a543336e6b26f378c69d107d563fa.tar.gz
repoctl-75a71063814a543336e6b26f378c69d107d563fa.tar.bz2
repoctl-75a71063814a543336e6b26f378c69d107d563fa.tar.xz
repoctl-75a71063814a543336e6b26f378c69d107d563fa.zip
check if distribution exist in mirror_repository function
-rw-r--r--functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/functions b/functions
index 36d8c79..96fb557 100644
--- a/functions
+++ b/functions
@@ -223,6 +223,11 @@ function update_common_MD5SUM()
function mirror_repository()
{
local distrorelease="$1"
+ if ! inlist "$distrorelease" "$distroreleases"
+ then
+ echo "Incorrect distrorelease $distrorelease" >&2
+ exit 1
+ fi
get_distro_lock "$distrorelease"
update_common_MD5SUM "$distrorelease"
$dryrun /usr/bin/rsync $mirror_rsync_options "$distribdir/$distrorelease/" "$finaldistribdir/$distrorelease/"