shellfiles/build_mercurial.sh.in
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 14 Nov 2018 12:50:40 +0100
branchjv
changeset 533 1bed627ec135
parent 159 40cdb9aa191d
permissions -rw-r--r--
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present - All source *.st files are now Unicode UTF8 without BOM Files are in two groups (fileOut works this way in Smalltalk/X): - containing a unicode character have "{ Encoding: utf8 }" at the header - ASCII only are without the header

#!/bin/bash 
# Simple Unix shell script to build Mercurial using Jenkins CI
# Designed to run under Cygwin as well. 

PROJECT="Mercurial Support"


m4_include(common.sh.in)

# Checkout
function checkout {
    # Checkout stx
    if [ ! -d stx ]; then
      if ! cvs co stx; then
        error "CVS: Cannot checkout stx";
      fi
    #else
    #  (cd stx && cvs update -d)
    fi

    # Checkout stx:libscm
    repo="https://bitbucket.org/janvrany/stx-libscm"
    if [ ! -d stx/libscm ]; then
        hg clone "$repo" stx/libscm || error "HG: cannot clone stx:libscm"
    else
        hg --cwd stx/libscm pull "$repo" || error "HG: cannot pull stx:libscm"
        hg --cwd stx/libscm update || error "HG: cannot update stx:libscm"
    fi
}


# Compile
function compile {
    TARGETS1="stx stx/libscm/common stx/libscm/mercurial stx/librun"
    for target in $TARGETS1; do
      if ! (cd "$target" && mk); then
        echo "ERROR:  cannot $MAKE in $target"
        exit 3
      fi
    done
}

function runtests {
    sunit "stx:libscm/mercurial"
}


# Now, call main
main $1 $2 $3