From d5776c4d1ca6f30094ddc9943fe14ddd7bccbc03 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= <Talip-Baris.Metin@sophia.inria.fr>
Date: Mon, 10 May 2010 14:37:00 +0000
Subject: [PATCH] a script to create partial myplc repositories. this comes
 handy to support more than one distro/arch in a myplc installation.

---
 bin/partial-repo.sh | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100755 bin/partial-repo.sh

diff --git a/bin/partial-repo.sh b/bin/partial-repo.sh
new file mode 100755
index 0000000..09771c0
--- /dev/null
+++ b/bin/partial-repo.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# $URL$
+
+COMMAND=$(basename $0)
+
+function usage () {
+    echo "Usage: $COMMAND repo1..."
+    echo "  a 'RPMS' subdir is expected in each repo arg"
+    exit 1
+}
+
+[[ -n "$@" ]] || usage
+
+set -e 
+
+for repo in "$@" ; do
+    if [ ! -d $repo/RPMS ] ; then
+	echo could not find $repo/RPMS - ignored
+	continue
+    fi
+
+    cd $repo
+    echo "==================== Dealing with repo $repo"
+    mkdir -p PARTIAL-RPMS
+    rsync --archive --verbose $(find RPMS -type f | egrep '/(bootcd|bootstrapfs|noderepo)-.*-.*-.*-.*rpm') PARTIAL-RPMS/
+    echo "==================== building packages index in $repo .."
+    createrepo PARTIAL-RPMS
+    echo '==================== DONE'
+    cd - >& /dev/null
+done
-- 
2.47.0