summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-05-28 16:34:40 +0200
committerRemi Collet <fedora@famillecollet.com>2014-05-28 16:34:40 +0200
commit60ba330abc4d82bb72f49dbc5aa743a14a88054a (patch)
tree193317b8f16eb804e74dd3b30f0e28e5a5ac5f8e
parenta46cf5ce45e53578559ebb16499738e58568f0e7 (diff)
keep 3 versions online for SRPMS
-rwxr-xr-xmkrepo22
1 files changed, 12 insertions, 10 deletions
diff --git a/mkrepo b/mkrepo
index fd05321..f776f41 100755
--- a/mkrepo
+++ b/mkrepo
@@ -11,25 +11,27 @@ if [ ${1:-check} != nocheck ]; then
fi
fi
-echo "+ Nettoyage des anciens"
-
-repomanage --old --keep=2 . | tee $TMP
-LST=$(cat $TMP)
-
-if [ -z "$LST" ]
-then echo OK.
-else mv $LST /data/rpms/old/
-fi
-
nom=${PWD#/home/rpmbuild/site/rpms/}
if [ "$nom" = "SRPMS" ]
then
dis=fedora
ver=17
+ old=3
else
dis=${nom%%/*}
ver=${nom#$dis/}
ver=${ver%%/*}
+ old=2
+fi
+
+echo "+ Nettoyage des anciens ($old)"
+
+repomanage --old --keep=$old . | tee $TMP
+LST=$(cat $TMP)
+
+if [ -z "$LST" ]
+then echo OK.
+else mv $LST /data/rpms/old/
fi
cache=/home/rpmbuild/site/rpms/.createrepocache/$nom