From 4e19402484e6cbc2e543192baed16d3dc8c77ba2 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 16 Jan 2009 16:07:26 +0000 Subject: enhanced behaviour for createpkg --search git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@746 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/createpkg | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 7b23f48..a46417d 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -87,7 +87,7 @@ ${red}COPYRIGHT${normal} This is free software. You may redistribute copies of it under the terms of the GNU General Public License <${yellow}http://www.gnu.org/licenses/gpl.html${normal}>. There is NO WARRANTY, - to the extent permitted by law." | more + to the extent permitted by law." } function build_all_slackbuild { @@ -534,11 +534,14 @@ case $1 in exit $EXIT_CODE ;; '--search'|'-s') - [ $# -ne 2 ] && usage # two parameters is required - LIST=`find_slackbuild $2` - for i in $LIST; do + if [ $# -ne 2 ]; then + list_builds + else + LIST=`find_slackbuild $2` + for i in $LIST; do echo $i | sed 's/.*\/\([^\/]\+\)\.[Ss]lack[Bb]uild$/ \1/' - done + done + fi exit $EXIT_CODE ;; '--info'|'-f') -- cgit v1.2.3