# HG changeset patch # User Christophe Lincoln # Date 1245381101 -7200 # Node ID e4b53fbe493e9364b0f0f78b37361dea20e7cfee # Parent 3934f2921b684dd0eb2d34c762def92aebd03383 tazdev: Add command projects-stats (-ps) diff -r 3934f2921b68 -r e4b53fbe493e slitaz-dev-tools/stuff/README --- a/slitaz-dev-tools/stuff/README Fri Jun 19 02:43:44 2009 +0200 +++ b/slitaz-dev-tools/stuff/README Fri Jun 19 05:11:41 2009 +0200 @@ -12,6 +12,7 @@ SliTaz Laboratories: http://labs.slitaz.org/ Developers wiki: http://labs.slitaz.org/wiki/distro Build host: http://tank.slitaz.org/ +Build bot: http://bb.slitaz.org/ =============================================================================== diff -r 3934f2921b68 -r e4b53fbe493e slitaz-dev-tools/stuff/tazdev --- a/slitaz-dev-tools/stuff/tazdev Fri Jun 19 02:43:44 2009 +0200 +++ b/slitaz-dev-tools/stuff/tazdev Fri Jun 19 05:11:41 2009 +0200 @@ -22,17 +22,18 @@ echo -e "\nSliTaz developers and build host tool\n \033[1mUsage: \033[0m `basename $0` [command] [user] [stable|cooking|path] \033[1mCommands: \033[0m\n - usage Print this short usage and command list. - cmplog Log 'tazwok cmp' result (or use tazbb). - update-wok Update Hg wok and copy it to the chroot wok. - update-www Update SliTaz Website repo from Hg. - chroot Mount virtual fs if needed and chroot into the build env. - gen-chroot Generate a chroot environment using the last cooking base rootf. - clean-chroot Clean a chroot environment (skip root/ and home/) - push Upload new packages to the main mirror. - dry-push Show what will be uploaded to the mirror. Does nothing. - pull Download new packages from the main mirror. - dry-pull Show what will be downloaded from the mirror. Does nothing.\n" + usage Print this short usage and command list. + projects-stats Display statistics about your projects (-ps) + cmplog Log 'tazwok cmp' result (or use tazbb). + update-wok Update Hg wok and copy it to the chroot wok. + update-www Update SliTaz Website repo from Hg. + chroot Mount virtual fs if needed and chroot into the build env. + gen-chroot Generate a chroot using the last cooking base rootfs. + clean-chroot Clean a chroot environment (skip root/ and home/) + push Upload new packages to the main mirror (-p). + dry-push Show what will be uploaded to the mirror. Does nothing (-dp). + pull Download new packages from the main mirror. + dry-pull Show what will be downloaded from the mirror. Does nothing.\n" } # Exit if user is not root. @@ -47,10 +48,11 @@ status() { local CHECK=$? + echo -en "\033[70G" if [ $CHECK = 0 ]; then - echo " Done" + echo "Done" else - echo " Failed" + echo "Failed" fi return $CHECK } @@ -145,6 +147,30 @@ echo -e "Starting 'tazwok cmp' (can be long)...\n" tazwok cmp | grep ^[A-Z] | tee $CMP_LOG echo "Date: `date`" >> $CMP_LOG ;; + '-ps'|projects-stats) + echo -e "\nStatistics for: $PROJECTS\n" + echo -n "Project" && echo -ne "\033[24G Size" && echo -ne "\033[38G Revision" + echo -ne "\033[48G Version" && echo -e "\033[64G Files" + echo "================================================================================" + cd $PROJECTS + for proj in * + do + rev="" + echo -n "$proj" + size=`du -sh $proj | awk '{ print $1 }'` + echo -ne "\033[24G $size" + if [ -d $proj/.hg ]; then + cd $proj + rev=`hg head --template '{rev}\n'` + vers=`hg tags | head -n 2 | tail -n 1 | cut -d " " -f 1` + echo -ne "\033[38G $rev" + echo -ne "\033[48G $vers" && cd .. + fi + files=`find $proj -type f | wc -l` + echo -e "\033[64G $files" + done + echo "================================================================================" + echo "" ;; update-wok) # Update the Hg wok and copy it to the chroot env. Hg wok is # copied to the chroot wok to avoid messing with build result @@ -219,11 +245,11 @@ done echo "================================================================================" echo "" ;; - push) + '-p'|push) check_mirror rsync -r -t -l -v -z --delete \ $LOCAL_DIR -e ssh $USER@$MIRROR:$REMOTE_DIR ;; - dry-push) + '-dp'|dry-push) check_mirror rsync -r -t -l -v -z --delete --dry-run \ $LOCAL_DIR -e ssh $USER@$MIRROR:$REMOTE_DIR ;; diff -r 3934f2921b68 -r e4b53fbe493e slitaz-dev-tools/stuff/tazdev.conf --- a/slitaz-dev-tools/stuff/tazdev.conf Fri Jun 19 02:43:44 2009 +0200 +++ b/slitaz-dev-tools/stuff/tazdev.conf Fri Jun 19 05:11:41 2009 +0200 @@ -10,6 +10,7 @@ # Path to the Website repo. WEBSITE="/home/slitaz/www/website" +PROJECTS="$HOME/Projects" # Main mirror to push and download (ISO, rootfs. etc). MIRROR="mirror.slitaz.org"