summaryrefslogtreecommitdiff
path: root/Tools/portbuild/scripts/chopindex
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/portbuild/scripts/chopindex')
-rwxr-xr-xTools/portbuild/scripts/chopindex13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/chopindex b/Tools/portbuild/scripts/chopindex
new file mode 100755
index 000000000000..feffb55ada19
--- /dev/null
+++ b/Tools/portbuild/scripts/chopindex
@@ -0,0 +1,13 @@
+#!/bin/sh
+if [ $# != 2 ]; then
+ echo "usage: chopindex <indexfile> <pkgdir>"
+ return 1
+fi
+index=$1
+pkgdir=$2
+/usr/bin/awk -v FS="|" -v pkgdir=$pkgdir '{
+ if (system(sprintf("test ! -e %s/All/%s.tgz\n", pkgdir, $1)))
+ print $0 ;
+}' $index | \
+ sed -e 's/XFree86-3\.3\.4//g' -e 's/Motif-2\.1\.10//g' \
+ -e 's/ */ /g' -e 's/| /|/g' -e 's/ |/|/g'