[projects/pld-ftp-admin] add to git
glen
glen at pld-linux.org
Sat Sep 5 22:16:19 CEST 2015
commit 2aae884a253d63e301f4da18849ebdab88882d65
Author: Elan Ruusamäe <glen at pld-linux.org>
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
More information about the pld-cvs-commit
mailing list