commit 2aae884a253d63e301f4da18849ebdab88882d65
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Sep 2 11:55:08 2012 +0300

    add to git

 wwwbin/by-group.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
---
diff --git a/wwwbin/by-group.sh b/wwwbin/by-group.sh
new file mode 100755
index 0000000..7107db3
--- /dev/null
+++ b/wwwbin/by-group.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+dir="$1"
+cd $dir || exit 1
+
+for f in *.rpm ; do
+       g=$(rpm --qf '%{GROUP}' -qp $f)
+       level=".."
+       a="$g"
+       b=
+       while [ "$a" != "$b" ]; do
+               b="$a"
+               a=${a#*/}
+               level="${level}/.."
+       done
+       [ -d "../by-group/$g" ] || mkdir -p "../by-group/$g"
+       ln -sf "$level/RPMS/$f" "../by-group/$g/$f"
+done
+
+# remove dangling symlinks...
+symlinks -dr $dir/../by-group
+# and empty directories
+find $dir/../by-group -depth -type d -empty -exec rmdir {} \;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/79bfa5416570425373d966239f009097dacbb7ff

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to