slitaz-dev-tools rev 70

tazdev: add reliso (I use it to rel official isos)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 12 19:57:29 2011 +0200 (2011-04-12)
parents 026420a06f32
children c0749db640da
files tazdev/tazdev tazdev/tazdev.conf
line diff
     1.1 --- a/tazdev/tazdev	Thu Apr 07 21:44:49 2011 +0200
     1.2 +++ b/tazdev/tazdev	Tue Apr 12 19:57:29 2011 +0200
     1.3 @@ -1,10 +1,13 @@
     1.4  #!/bin/sh
     1.5 -# Tazdev - SliTaz developers and build host tool.
     1.6 -# System wide config file: /etc/slitaz/tazdev.conf
     1.7 +#
     1.8 +# Tazdev - SliTaz developers and build host tool. System wide config
     1.9 +# file is located at: /etc/slitaz/tazdev.conf
    1.10  #
    1.11  # (c) 2011 SliTaz GNU/Linux - GNU gpl v3
    1.12  #
    1.13 -# Authors : Christophe Lincoln (Pankso) <pankso@slitaz.org>
    1.14 +# AUTHORS
    1.15 +#     Christophe Lincoln <pankso@slitaz.org>
    1.16 +#     Pascal Bellard <bellard@slitaz.org>
    1.17  #
    1.18  
    1.19  if [ -f /etc/slitaz/tazdev.conf ]; then
    1.20 @@ -24,20 +27,21 @@
    1.21  	echo -e "\nSliTaz developers and build host tool\n
    1.22  \033[1mUsage: \033[0m `basename $0` [command] [user] [stable|cooking|undigest|path]
    1.23  \033[1mCommands: \033[0m\n
    1.24 - usage          Print this short usage and command list.
    1.25 - projects-stats Display statistics about your projects (-ps).
    1.26 - cmplog         Log 'tazwok cmp' result (or use tazbb).
    1.27 - update-wok     Update Hg wok and copy it to the chroot wok.
    1.28 - chroot         Mount virtual fs if needed and chroot into the build env.
    1.29 - gen-chroot     Generate a chroot using the last cooking base rootfs.
    1.30 - clean-chroot   Clean a chroot environment (skip root/ and home/).
    1.31 - purge          Remove obsolete packages and obsolete source tarballs.
    1.32 - dry-purge      Show obsolete packages and obsolete source tarballs.
    1.33 - push           Upload new packages to the main mirror (-p).
    1.34 - dry-push       Show what will be uploaded to the mirror. Does nothing (-dp).
    1.35 - pull           Download new packages from the main mirror.
    1.36 - dry-pull       Show what will be downloaded from the mirror. Does nothing.
    1.37 - relpkg         Archive and upload new package/project version.\n"
    1.38 + usage               Print this short usage and command list
    1.39 + projects-stats|-ps  Display statistics about your projects
    1.40 + cmplog              Log 'tazwok cmp' result (or use tazbb)
    1.41 + update-wok          Update Hg wok and copy it to the chroot wok
    1.42 + chroot              Mount virtual fs if needed and chroot into the build env
    1.43 + gen-chroot          Generate a chroot using the last cooking base rootfs
    1.44 + clean-chroot        Clean a chroot environment (skip root/ and home/)
    1.45 + purge               Remove obsolete packages and obsolete source tarballs
    1.46 + dry-purge           Show obsolete packages and obsolete source tarballs
    1.47 + push|-p             Upload new packages to the main mirror.
    1.48 + dry-push|-dp        Show what will be uploaded to the mirror. Does nothing
    1.49 + pull                Download new packages from the main mirror.
    1.50 + dry-pull            Show what will be downloaded from the mirror. Does nothing
    1.51 + relpkg|-rp          Archive and upload new package/project version
    1.52 + reliso|-ri          Create all main flavors (not loram)\n"
    1.53  }
    1.54  
    1.55  # Exit if user is not root.
    1.56 @@ -208,7 +212,7 @@
    1.57  		echo -e "Starting 'tazwok cmp' (can be long)...\n"
    1.58  		tazwok cmp | grep ^[A-Z] | tee $CMP_LOG
    1.59  		echo "Date: `date`" >> $CMP_LOG ;;
    1.60 -	'-ps'|projects-stats)
    1.61 +	projects-stats|-ps)
    1.62  		echo -e "\nStatistics for: $PROJECTS\n"
    1.63  		echo -n "Project" && echo -ne "\033[24G Size" && echo -ne "\033[38G Revision"
    1.64  		echo -ne "\033[48G Version" && echo -e "\033[64G Files"
    1.65 @@ -295,11 +299,11 @@
    1.66  		done
    1.67  		echo "================================================================================"
    1.68  		echo "" ;;
    1.69 -	'-p'|push)
    1.70 +	push|-p)
    1.71  		check_mirror $@
    1.72  		rsync -r -t -l -v -z --delete \
    1.73  			$LOCAL_DIR -e ssh $USER@$MIRROR:$REMOTE_DIR ;;
    1.74 -	'-dp'|dry-push)
    1.75 +	dry-push|-dp)
    1.76  		check_mirror $@
    1.77  		rsync -r -t -l -v -z --delete --dry-run \
    1.78  			$LOCAL_DIR -e ssh $USER@$MIRROR:$REMOTE_DIR ;;
    1.79 @@ -316,7 +320,7 @@
    1.80  		get_version $@
    1.81  		purge_packages $1
    1.82  		purge_sources $1 ;;
    1.83 -	relpkg)
    1.84 +	relpkg|-rp)
    1.85  		[ -z "$MIRROR_SOURCES" ] && MIRROR_SOURCES="/var/www/slitaz/mirror/sources"
    1.86  		if [ -z $2 ] || [ -z $3 ]; then
    1.87  			echo -e "\nUsage: $0 relpkg package version\n"
    1.88 @@ -345,6 +349,24 @@
    1.89  			scp $PACKAGE-$VERSION.tar.gz $PACKAGE-$VERSION.md5 \
    1.90  				$USER@$MIRROR:$MIRROR_SOURCES/${PACKAGE#slitaz-}
    1.91  		fi ;;
    1.92 +	reliso|-ri)
    1.93 +		# Generate all official images iso at once.
    1.94 +		version=$2
    1.95 +		mkdir -p $ISO
    1.96 +		for flavor in base core justx firefox
    1.97 +		do
    1.98 +			cd /home/slitaz/$version
    1.99 +			tazlito pack-flavor $flavor
   1.100 +			tazlito get-flavor $flavor
   1.101 +			tazlito gen-distro
   1.102 +			if [ "$flavor" == "core" ]; then
   1.103 +				cp distro/slitaz-$flavor.iso $ISO/slitaz-$version.iso
   1.104 +				cd $ISO && md5sum slitaz-$version.iso > slitaz-$version.md5
   1.105 +			else
   1.106 +				cp distro/slitaz-$flavor.iso $ISO/slitaz-$version-$flavor.iso
   1.107 +				cd $ISO && md5sum slitaz-$version-$flavor.iso slitaz-$version-$flavor.md5
   1.108 +			fi
   1.109 +		done ;;
   1.110  	usage|*)
   1.111  		usage ;;
   1.112  esac
     2.1 --- a/tazdev/tazdev.conf	Thu Apr 07 21:44:49 2011 +0200
     2.2 +++ b/tazdev/tazdev.conf	Tue Apr 12 19:57:29 2011 +0200
     2.3 @@ -12,6 +12,9 @@
     2.4  # Path to all own and copy projects.
     2.5  PROJECTS="$HOME/Projects"
     2.6  
     2.7 +# Destination for generated images ISO
     2.8 +ISO=$HOME/Desktop
     2.9 +
    2.10  # Main mirror to push and download (ISO, rootfs. etc).
    2.11  MIRROR="mirror.slitaz.org"
    2.12  DL_URL="http://mirror.switch.ch/ftp/mirror/slitaz"