]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
enhanced behaviour for createpkg --search
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 16 Jan 2009 16:07:26 +0000 (16:07 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 16 Jan 2009 16:07:26 +0000 (16:07 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@746 04377dda-e619-0410-9926-eae83683ac58

trunk/src/createpkg

index 7b23f48cef494a3a0f50e1193062e1888a8dd109..a46417d2918b2f1b083306daf84122bc96769e7d 100644 (file)
@@ -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')