Permalink
Browse files

find_root: use osc develproject where available

"osc develproject" is an osc command. If that's available, use it, if
not, fall back to meta pkg parsing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
  • Loading branch information...
Jiri Slaby
Jiri Slaby committed Jun 4, 2011
1 parent 02fe19d commit b650d3ebc14e08533ed75d198b655b27672b24f3
Showing with 5 additions and 1 deletion.
  1. +5 −1 find_root
View
@@ -2,4 +2,8 @@
PACKAGE_NAME=$1
-osc meta pkg openSUSE:Factory $PACKAGE_NAME | grep "devel project" | cut -f 2 -d '=' | cut -f 1 -d ' '
+osc develproject openSUSE:Factory $PACKAGE_NAME 2>/dev/null
+if [ $? -ne 0 ]; then
+ # older osc doesn't support develproject
+ osc meta pkg openSUSE:Factory $PACKAGE_NAME | grep "devel project" | cut -f 2 -d '=' | cut -f 1 -d ' '
+fi

0 comments on commit b650d3e

Please sign in to comment.