formerly on devel in /build/sfa under simpler names
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 21 Jan 2013 09:10:45 +0000 (10:10 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 21 Jan 2013 09:10:45 +0000 (10:10 +0100)
going for something similar for debian

scripts/sfa-reindex-fedora.sh [new file with mode: 0755]
scripts/sfa-stable-fedora.sh [new file with mode: 0755]

diff --git a/scripts/sfa-reindex-fedora.sh b/scripts/sfa-reindex-fedora.sh
new file mode 100755 (executable)
index 0000000..6ad3894
--- /dev/null
@@ -0,0 +1,4 @@
+# partial builds do not seem to index their output repos
+find_in=.
+[[ -n "$@" ]] && find_in="$@"
+for rpm in $(find $find_in -name RPMS); do createrepo $rpm ; done
diff --git a/scripts/sfa-stable-fedora.sh b/scripts/sfa-stable-fedora.sh
new file mode 100755 (executable)
index 0000000..325d5ee
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+# usage e.g. $0 1.0-20
+[[ -z "$@" ]] && { echo Usage $0 stable ; exit 1 ; }
+stable=$1; shift
+[[ -n "$@" ]] && { echo Usage $0 stable ; exit 1 ; }
+stable=$(echo $stable | sed -e s,/,,g)
+for dir in $(ls -d $stable/*[24]) ; do
+  base=$(echo $dir | sed -e s,/,,g -e s,--,,g -e s,sfa-,,g -e s,$stable,,g)
+  stablelink="stable-$base"
+  echo Linking $stablelink to $dir
+  [ -h $stablelink ] && rm $stablelink
+  [ -e $stablelink ] && { echo "found not-a-link $base - ignored" ; continue  ; }
+  ln -s $dir $stablelink
+done