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