tazwok rev 108

Add command 'maintainers' to list all packagers for a wok
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jan 18 00:02:51 2009 +0100 (2009-01-18)
parents 5c096869a0bb
children 2a0e22536a34
files tazwok
line diff
     1.1 --- a/tazwok	Sat Jan 17 23:55:08 2009 +0100
     1.2 +++ b/tazwok	Sun Jan 18 00:02:51 2009 +0100
     1.3 @@ -103,7 +103,8 @@
     1.4    gen-list       Generate a packages list for a repository (--text).
     1.5    gen-clean-wok  Gen a clean wok in a dir ('clean-wok' cleans current wok).
     1.6    remove         Remove a package from the wok.
     1.7 -  hgup           Pull and update a wok under HG.
     1.8 +  hgup           Pull and update a wok under Hg.
     1.9 +  maintainers    List all maintainers in the wok.
    1.10    maintained-by  List packages maintained by a contributor\n"
    1.11  }
    1.12  
    1.13 @@ -1215,6 +1216,24 @@
    1.14  		fi
    1.15  		cd $WOK
    1.16  		hg pull && hg update ;;
    1.17 +	maintainers)
    1.18 +		echo ""
    1.19 +		echo "List of maintainers for: $WOK"
    1.20 +		echo "================================================================================"
    1.21 +		touch /tmp/slitaz-maintainers
    1.22 +		for pkg in $WOK/*
    1.23 +		do
    1.24 +			. $pkg/receipt
    1.25 +			if ! grep -q "$MAINTAINER" /tmp/slitaz-maintainers; then
    1.26 +				echo "$MAINTAINER" >> /tmp/slitaz-maintainers
    1.27 +				echo "$MAINTAINER"
    1.28 +			fi
    1.29 +		done
    1.30 +		echo "================================================================================"
    1.31 +		echo "Maintainers: `cat /tmp/slitaz-maintainers | wc -l`"
    1.32 +		echo ""
    1.33 +		# Remove tmp files
    1.34 +		rm -f /tmp/slitaz-maintainers ;;
    1.35  	maintained-by)
    1.36  		# Search for packages maintained by a packagers.
    1.37  		if [ ! -n "$2" ]; then