?? release.sh
字號(hào):
#!/bin/sh# assumed dir structure:## src## src/orocos-branches## src/orocos-branches/branch-0.22## src/export## cd export; ./release.sh 0.22.0if [ x$1 == x ] ; then echo "Please provide version-string parameter (e.g. 0.24.1)"exit 1fi;VERSION=$1 unset ECOS_REPOSITORYecho -e "This script builds a release on Peter's Orocos tree :\n 0. DELETE old rm -rf orocos-$VERSION 1. export a branch with the correct version 2. make distcheck 3. generate _only_ html docs in packages (set DODOCS to yes) 4. create all epk packages and templates 5. create the all-in-one downloadable package 6. extract and build it 7. upload files to server"# Set to no for testing, yes for release# only here for saving time.# Set DODOCS to yes for release# Set DOBUILD to yes for testing# Set DOEXAMPLES to release the examples.DODOCS=yesDOBUILD=noDOEXAMPLES=yesDODISTCC=noDOCHECKS=noUSER=psoetens#compiler stuff :if [ x$DODISTCC = xyes ]; thenCC="distcc"CXX="distcc"MAKEF="-j3"elseCC="gcc"CXX="gcc"MAKEF=""fiBRANCHVERSION=$(echo $VERSION | sed -e 's/\(.*\)\.\(.*\)\..*/\1.\2/g')echo "DODOCS is set to $DODOCS"echo "DOBUILD is set to $DOBUILD"echo "DOEXAMPLES is set to $DOEXAMPLES"echo "DODISTCC is set to $DODISTCC"echo "DOCHECKS is set to $DOCHECKS"echo "VERSION is set to $VERSION"echo "BRANCHVERSION is set to $BRANCHVERSION"echo "Press d to copy files to server, any other key to build and Ctrl-C to abort..."read -s -n1 xif [ x$x != xd ] ; then#cleanup left-oversmkdir -p orocos-$VERSION/buildchmod a+w orocos-$VERSION/build -Rrm -rf orocos-$VERSION# MAKE SURE that you have the branch on diskcd ../orocos-branches/branch-$BRANCHVERSIONsvn upcd -svn export ../orocos-branches/branch-$BRANCHVERSION ./orocos-$VERSION || exit 1#svn export -rHEAD ../orocos-trunk ./orocos-$VERSION || exit 1cd orocos-$VERSION || exit 1./autogen.sh## Build base package#mkdir -p buildcd build../configureif test x$DOCHECKS = xyes; thenmake distcheck CC=$CC CXX=$CXX || exit 1elsemake dist || exit 1ficd ..## eCos Packages## Build the package documentation (html files)if test x$DODOCS != xno ; then echo "DODOCS was set to $DODOCS : building docs" cd packages make html-dist || exit 1 cd ..fi# Build the ecos packagescd packages./ecospkggen.py -V $VERSION -t gnulinux./ecospkggen.py -V $VERSION -t lxrt./ecospkggen.py -V $VERSION -t xenomai./ecospkggen.py -V $VERSION -T corelib-os./ecospkggen.py -V $VERSION -T kinematics-dynamics./ecospkggen.py -V $VERSION -T control-framework./ecospkggen.py -V $VERSION -T device-interface./ecospkggen.py -V $VERSION -T device-drivers./ecospkggen.py -V $VERSION -T execution./ecospkggen.py -V $VERSION -T signal-processing./ecospkggen.py -V $VERSION -T allpackages./ecospkggen.py -V $VERSION -T minimal./ecospkggen.py -V $VERSION -T dist-packages./ecospkggen.py -V $VERSION -T control-services./ecospkggen.py -V $VERSION geometry#./ecospkggen.py -V $VERSION applications_testcasemkdir -p epkmv *.epk epk/cd ..# Build the i386linux package for orocos-installer.tclecho "Making the i386linux package..."curdir=$(pwd)rm -rf /tmp/oroinstmkdir /tmp/oroinst#copy specific packages #The user gets all the packages we have and some extra# templates. dist-packages will be the default template# for make all_packagescp packages/epk/allpackages-$VERSION.epk /tmp/oroinstcp packages/epk/minimal-$VERSION.epk /tmp/oroinstcp packages/epk/dist-packages-$VERSION.epk /tmp/oroinstcp packages/epk/control-services-$VERSION.epk /tmp/oroinstcp packages/epk/gnulinux-$VERSION.epk /tmp/oroinstcp packages/epk/lxrt-$VERSION.epk /tmp/oroinstcp packages/epk/xenomai-$VERSION.epk /tmp/oroinstcp build/orocos-$VERSION.tar.gz /tmp/oroinstcd /tmp/oroinsttar -xzf orocos-$VERSION.tar.gzcd orocos-$VERSION/packages/touch ecos.dbfor i in $(ls ../../*-$VERSION.epk); do ./ecosadmin.tcl add $i; done;cd ../..tar -cjf orocos-$VERSION.tar.bz2 orocos-$VERSIONmv orocos-$VERSION.tar.bz2 $curdir/build/cd $curdir#i386Linux packagecp tools/bin/* /tmp/oroinstcd /tmp/oroinst/orocos-$VERSIONmkdir -p tools/binmv /tmp/oroinst/ecosconfig /tmp/oroinst/configtool tools/bin/cd ..tar -cjf orocos-$VERSION.i386linux.tar.bz2 orocos-$VERSIONmv orocos-$VERSION.i386linux.tar.bz2 $curdir/build/cd $curdirif test x$DOBUILD = xyes; thenBLDDIR=/tmp/orotstBLDINSTALL=$BLDDIR/orocos-$VERSION/build/packages/install# next unpack and make them :rm -rf /tmp/orotstmkdir /tmp/orotstcd /tmp/orotsttar -xjf $curdir/build/orocos-$VERSION.i386linux.tar.bz2cd /tmp/orotst/orocos-$VERSION || exit 1mkdir build ; cd build../configure || exit 1make new_packages || exit 1if test x$DOCHECKS = xyes; thenmake check-headers CC=$CC CXX=$CXX || exit 1fimake check CC=$CC CXX=$CXX $MAKEF || exit 1cd $curdirfiif test x$DOEXAMPLES = xyes; then#examplescd ..# find example namescd ../orocos-branches/examples-$BRANCHVERSION/svn upEXAMPLES=$(find $(ls) -maxdepth 0 -type d)cd -for i in $EXAMPLES; do rm -rf ./$i-$VERSION svn export ../orocos-branches/examples-$BRANCHVERSION/$i ./$i-$VERSION || continue tar -czf $i-$VERSION.tar.gz $i-$VERSION if test x$DOBUILD = xyes; then cd $i-$VERSION (make OROPATH=$BLDINSTALL && make clean ) || exit 1 cd .. fidonefiecho "Seems all to be ok."echo "Press a key to copy files to server, Ctrl-C to abort..."read -s -n1else cd orocos-$VERSION || exit 1fi; # press d# Basessh -l$USER srv04 "mkdir -p pub_html/orocos/packages/$VERSION"# EPKscd packages/epkscp *-$VERSION.epk $USER@srv04:pub_html/orocos/packages/$VERSION || exit 1cd ../..# Release notes (optional)cd build/docscp orocos-changes.html $USER@srv04:pub_html/orocos/packages/$VERSION/orocos-changes-$VERSION.htmlcd ../..# Orocos without toolscd buildscp orocos-$VERSION.tar.bz2 $USER@srv04:pub_html/orocos/packages/$VERSION || exit 1cd ..# Orocos with i386linux toolsscp tools/installer/orocos-install.tcl tools/installer/orocos-install.db $USER@srv04:pub_html/orocos/packagesscp build/orocos-$VERSION.i386linux.tar.bz2 $USER@srv04:pub_html/orocos/packages/$VERSION || exit 1# Orocos Examplesif test x$DOEXAMPLES = xyes; then for i in $EXAMPLES; do ssh -l$USER srv04 "mkdir -p pub_html/orocos/apps/examples/$i" scp $i-$VERSION.tar.gz $USER@srv04:pub_html/orocos/apps/examples/$i/ || exit 1 scp $i-$VERSION/README $USER@srv04:pub_html/orocos/apps/examples/$i/README-$VERSION.txt || exit 1 scp $i-$VERSION/README $USER@srv04:pub_html/orocos/apps/examples/$i/README.txt || exit 1 donefi
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -