shellfiles/build_mercurial.sh.in
author Claus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 13:54:38 +0100
changeset 542 aa25a71be62a
parent 159 40cdb9aa191d
permissions -rw-r--r--
#DOCUMENTATION by cg
class: stx_goodies_builder_quickSelfTest
class definition

class: stx_goodies_builder_quickSelfTest class
added:18 methods
     1 #!/bin/bash 
     2 # Simple Unix shell script to build Mercurial using Jenkins CI
     3 # Designed to run under Cygwin as well. 
     4 
     5 PROJECT="Mercurial Support"
     6 
     7 
     8 m4_include(common.sh.in)
     9 
    10 # Checkout
    11 function checkout {
    12     # Checkout stx
    13     if [ ! -d stx ]; then
    14       if ! cvs co stx; then
    15         error "CVS: Cannot checkout stx";
    16       fi
    17     #else
    18     #  (cd stx && cvs update -d)
    19     fi
    20 
    21     # Checkout stx:libscm
    22     repo="https://bitbucket.org/janvrany/stx-libscm"
    23     if [ ! -d stx/libscm ]; then
    24         hg clone "$repo" stx/libscm || error "HG: cannot clone stx:libscm"
    25     else
    26         hg --cwd stx/libscm pull "$repo" || error "HG: cannot pull stx:libscm"
    27         hg --cwd stx/libscm update || error "HG: cannot update stx:libscm"
    28     fi
    29 }
    30 
    31 
    32 # Compile
    33 function compile {
    34     TARGETS1="stx stx/libscm/common stx/libscm/mercurial stx/librun"
    35     for target in $TARGETS1; do
    36       if ! (cd "$target" && mk); then
    37         echo "ERROR:  cannot $MAKE in $target"
    38         exit 3
    39       fi
    40     done
    41 }
    42 
    43 function runtests {
    44     sunit "stx:libscm/mercurial"
    45 }
    46 
    47 
    48 # Now, call main
    49 main $1 $2 $3