git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag myplc-7.0-0
[build.git]
/
mirroring
/
mirror.sh
diff --git
a/mirroring/mirror.sh
b/mirroring/mirror.sh
index
e7343f4
..
95778da
100755
(executable)
--- a/
mirroring/mirror.sh
+++ b/
mirroring/mirror.sh
@@
-1,12
+1,11
@@
#!/bin/bash
#!/bin/bash
-# $Id$
COMMAND=$(basename $0)
DIRNAME=$(dirname $0)
default_url="http://localhost/mirror/"
COMMAND=$(basename $0)
DIRNAME=$(dirname $0)
default_url="http://localhost/mirror/"
-default_distro="f
8
"
-all_distros="f
c4 fc6 f7 f8 centos5
"
+default_distro="f
14
"
+all_distros="f
12 f14 f16 f18 f20
"
function check_distro () {
local distro=$1; shift
function check_distro () {
local distro=$1; shift
@@
-19,7
+18,7
@@
function check_distro () {
function do_repo () {
local distro=$1; shift
function do_repo () {
local distro=$1; shift
- sedargs="-e s,@MIRRORURL@,$URL,"
+ sedargs="-e s,@MIRRORURL@,$URL,
g
"
[ -n "$GPGOFF" ] && sedargs="$sedargs -e "'s,gpgcheck\W*=\W*1,gpgcheck=0,'
sed $sedargs $DIRNAME/$distro/yum.repos.d/building.repo.in
}
[ -n "$GPGOFF" ] && sedargs="$sedargs -e "'s,gpgcheck\W*=\W*1,gpgcheck=0,'
sed $sedargs $DIRNAME/$distro/yum.repos.d/building.repo.in
}
@@
-55,7
+54,7
@@
function do_display () {
dir=/etc/vservers/.distributions/$distro/yum.repos.d/
if [ -d $dir ] ; then
echo "====================" Contents of $dir
dir=/etc/vservers/.distributions/$distro/yum.repos.d/
if [ -d $dir ] ; then
echo "====================" Contents of $dir
-
find $dir -name '*.repo'
| xargs head --verbose --lines=1000
+
ls $dir/*.repo 2> /dev/null
| xargs head --verbose --lines=1000
else
echo "====================" $dir does not exist
fi
else
echo "====================" $dir does not exist
fi
@@
-79,14
+78,14
@@
function usage () {
echo "Usage $COMMAND [options] <command>"
echo " a help to manage the yum.repos.d template in /etc/vservers/.distributions/<distro>"
echo "Available commands"
echo "Usage $COMMAND [options] <command>"
echo " a help to manage the yum.repos.d template in /etc/vservers/.distributions/<distro>"
echo "Available commands"
- echo " display: shows content (default if missing)"
- echo " init: creates /etc/vservers/.distributions/<distro>/yum.repos.d/building.repo"
- echo " default is to use mirror root at $default_url"
- echo " use -u URL to specify another location"
+ echo " display: shows content (default if <command> is missing)"
echo " diff: shows diff between current and what init would do"
echo " diff: shows diff between current and what init would do"
+ echo " init: creates /etc/vservers/.distributions/<distro>/yum.repos.d/building.repo"
echo " clean: removes building.repo"
echo " superclean: removes yum.repos.d altogether"
echo "Options"
echo " clean: removes building.repo"
echo " superclean: removes yum.repos.d altogether"
echo "Options"
+ echo " -u URL to specify another location"
+ echo " default is to use mirror root at $default_url"
echo " -f <distro> : defaults to $default_distro"
echo " -a : runs on all distros $all_distros"
echo " -0 : turns off gpgcheck"
echo " -f <distro> : defaults to $default_distro"
echo " -a : runs on all distros $all_distros"
echo " -0 : turns off gpgcheck"
@@
-94,7
+93,7
@@
function usage () {
echo "Examples"
echo " $COMMAND -a display "
echo " $COMMAND -a superclean"
echo "Examples"
echo " $COMMAND -a display "
echo " $COMMAND -a superclean"
- echo " $COMMAND -a -u http://mirror.one
-lab.org
/ init"
+ echo " $COMMAND -a -u http://mirror.one
lab.eu
/ init"
echo " $COMMAND -a display"
exit 1
}
echo " $COMMAND -a display"
exit 1
}