From f6057bf8b91d8d1f329b646b39d45a1cf80680b7 Mon Sep 17 00:00:00 2001 From: crazy Date: Mon, 19 Oct 2015 08:15:39 +0200 Subject: [PATCH 2/2] info() - added some missing checks * since the syntax is repoman info we need to check for $1 * before doing something , print a nice msg if not * also reverse the logic in for loop and check first $1 exists --- repoman | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/repoman b/repoman index a6e4092..629a353 100755 --- a/repoman +++ b/repoman @@ -958,9 +958,16 @@ search() info() { chk_updated $fst_root + if [ -z "$1" ]; then + msg " Use repoman info " + exit 1 + fi for i in ${repos[@]} do - if [ -d $fst_root/$i/source/*/$1 ]; then + if [ ! -d $fst_root/$i/source/*/$1 ]; then + msg " Could not find package $1.. Typo?" + exit 1 + else cd $fst_root/$i/source/*/$1 startdir=`pwd` source ./FrugalBuild -- 2.6.2