]> Frank Brehm's Git Trees - scripts/root-bin.git/commitdiff
Initial revision
authorroot <empty>
Mon, 21 May 2007 08:13:30 +0000 (08:13 +0000)
committerroot <empty>
Mon, 21 May 2007 08:13:30 +0000 (08:13 +0000)
use-desc.sh [new file with mode: 0644]

diff --git a/use-desc.sh b/use-desc.sh
new file mode 100644 (file)
index 0000000..55e09f5
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+if [ -f /etc/make.globals ] ; then
+  . /etc/make.globals
+else
+  echo "/etc/make.globals nicht gefunden" >&2
+  exit 10
+fi
+
+if [ -f /etc/make.conf ] ; then
+  . /etc/make.conf
+else
+  echo "/etc/make.conf nicht gefunden" >&2
+  exit 10
+fi
+
+echo "Suche USE-Beschreibungen in '$PORTDIR/profiles/use*.desc' ..."
+echo
+
+if [ ! -d $PORTDIR/profiles ] ; then
+  echo "'$PORTDIR/profiles' nicht gefunden." >&2
+  exit 10
+fi
+
+if [ ! -f $PORTDIR/profiles/use.desc -a ! -f $PORTDIR/profiles/use.local.desc ] ; then
+  echo "'$PORTDIR/profiles/use.desc' bzw. '$PORTDIR/profiles/use.local.desc' nicht gefunden."
+  exit 10
+fi
+
+for ITEM in $* ; do
+  ITEM_N=`echo $ITEM | sed 's/+/\\\\+/g'`
+  cat $PORTDIR/profiles/use.desc $PORTDIR/profiles/use.local.desc | egrep "(^|:)$ITEM_N[        ][      ]*-"
+  echo
+done
+