#!/usr/bin/bash # # Dieses Skript packt ein installierbares tgz, das nach dem Auspacken mit # mInstall installierbar ist. # # Aufruf: mBuild [|TOP] # Parameter: : Tag der Auslieferung. Falls der Tag im CVS noch nicht # bekannt ist, muss der zweite Parameter gegeben sein: # : (moving) Tag oder "TOP" für den top level Stand zum # Auschecken. Das Ganze wird danach mit getaggt. # @TODO: Das funktioniert noch nicht! # # Input: # # - Datei mit den auszucheckenden Anteilen: .co # - Datei mit applikationsspezifischen Packkomandos: .build if [[ $# -lt 2 ]]; then echo "usage: mBuild []" exit 1 fi envfile=`envfinder mBuild` || exit 1 . $envfile if [[ -e tmp ]]; then echo "(i)nkrementeller Build oder (n)euer Build ? (n)" read antw if [[ "$antw" == "i" ]]; then ; # continue else rm -r tmp fi fi if [[ -f $1.tgz ]]; then rm mSpuTools.tgz fi mkdir tmp mkdir tmp/mTools cd tmp/mTools mkdir etc #--------------------------------------------- # check out #--------------------------------------------- echo "check out" for file in `find . -name $1.co`; do for pfad in `cat $file`; do $CO $pfad done done # checkout mInstall cvs co mjm/tools/Development/mInstall cp mjm/tools/Development/mInstall .. #--------------------------------------------- # build #--------------------------------------------- echo "build" for file in `find . -name $1.make`; do echo "make $file" make -f $file $1 done cd .. # copy documentation docdirs=`find . -type d -name doc` for docdir in $docdirs; do find $docdir -maxdepth 1 -type f -exec cp {} . \; done #--------------------------------------------- # besondere Schritte #--------------------------------------------- echo "besondere Schritte" for file in `find . -name $1.build`; do echo "executing $file" . $file done #--------------------------------------------- # packe Auslieferung #--------------------------------------------- echo "packe Auslieferung" tar cf mTools.tar mTools rm -r mTools tar czf ../$1.tgz * cd .. echo fertig