cookutils diff cook @ rev 69
cook: add a very small search function
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 07 18:43:36 2011 +0200 (2011-05-07) |
parents | 67e279a35515 |
children | dad3f6ed300c |
line diff
1.1 --- a/cook Sat May 07 18:12:59 2011 +0200 1.2 +++ b/cook Sat May 07 18:43:36 2011 +0200 1.3 @@ -27,9 +27,10 @@ 1.4 1.5 $(echo -e "\033[1m$(gettext "Commands:")\033[0m") 1.6 usage|help $(gettext "Display this short usage.") 1.7 - list-wok $(gettext "List packages in the wok.") 1.8 setup $(gettext "Setup your build environment.") 1.9 test $(gettext "Test environment and cook a package.") 1.10 + list-wok $(gettext "List packages in the wok.") 1.11 + search $(gettext "Simple packages search function.") 1.12 new $(gettext "Create a new package with a receipt".) 1.13 list $(gettext "Cook a list of packages.") 1.14 clean-wok $(gettext "Clean-up all packages files.") 1.15 @@ -203,7 +204,7 @@ 1.16 gettext "Creating tarball: "; echo "$tarball" 1.17 tar cjf $tarball $pkgsrc || exit 1 1.18 mv $tarball $SRC && rm -rf $pkgsrc ;; 1.19 - svn*) 1.20 + svn*|subversion*) 1.21 echo "TODO: svn implementation in cook" && exit 1 ;; 1.22 *) 1.23 gettext -e "\nERROR: Unable to handle:"; echo -e " $WGET_URL \n" | \ 1.24 @@ -566,6 +567,13 @@ 1.25 separator 1.26 echo -n "Packages: " && ls | wc -l 1.27 echo "" ;; 1.28 + search) 1.29 + # Just a simple search function, we dont need more actually. 1.30 + query="$2" 1.31 + gettext -e "\nSearch results for:"; echo " $query" 1.32 + separator 1.33 + cd $WOK && ls -1 | grep "$query" 1.34 + separator && echo "" ;; 1.35 setup) 1.36 # Setup a build environment 1.37 check_root