Browse files

speed up check_package by about a second per call for the common case.

  • Loading branch information...
1 parent 91ed9d6 commit 9b511c6205046902aa9aa62cb02d0f0009f9db6c @gregkh committed Feb 23, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 check_package
View
16 check_package
@@ -37,16 +37,16 @@ compare_version() {
exit 1
fi
- EXIST=`osc ls $TUMBLE_REPO | grep $PACKAGE`
- if [ "$EXIST" = "" ]
+ TUMBLE_LINK=`osc cat $TUMBLE_REPO/$PACKAGE/_link 2> /dev/null | grep rev | cut -f 4 -d ' ' | cut -f 2 -d '=' | cut -f 1 -d '=' | sed -e 's/\"//g'`
+ #echo $TUMBLE_LINK
+ if [ "$TUMBLE_LINK" = "" ]
then
- echo "# $PACKAGE is not in Tumbleweed, add it by doing:"
- else
- TUMBLE_LINK=`osc cat $TUMBLE_REPO/$PACKAGE/_link 2> /dev/null | grep rev | cut -f 4 -d ' ' | cut -f 2 -d '=' | cut -f 1 -d '=' | sed -e 's/\"//g'`
- #echo $TUMBLE_LINK
- if [ "$TUMBLE_LINK" = "" ]
+ EXIST=`osc ls $TUMBLE_REPO | grep $PACKAGE`
+ if [ "$EXIST" = "" ]
then
- echo "# $PACKAGE is not a linked package in Tumbleweed, to overwrite the link, do:"
+ echo "# $PACKAGE is not in $TUMBLE_REPO, add it by doing:"
+ else
+ echo "# $PACKAGE is not a linked package in $TUMBLE_REPO, to overwrite the link, do:"
fi
fi

0 comments on commit 9b511c6

Please sign in to comment.