File: ci-appveyor-setup

package info (click to toggle)
xalan 1.12-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,368 kB
  • sloc: cpp: 145,645; xml: 1,523; ansic: 434; sh: 27; makefile: 17
file content (53 lines) | stat: -rwxr-xr-x 1,187 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!c:/cygwin64/bin/bash

set -e
set -x

PATH="/cygdrive/c/cygwin64/bin:$PATH"

download_file()
(
    url="$1"
    file="$2"
    hash="$3"
    hash_output="${hash} *$file"

  if [ ! -f "$file" ]; then
    echo "Downloading $file"
  else
    if [ "$(sha512sum "$file")" != "$hash_output" ]; then
      echo "$file sha512sum mismatch"
    fi
  fi

  if [ ! -f "$file" ] || [ "$(sha512sum "$file")" != "$hash_output" ]; then
    rm -f "$file"
    curl -L -o "$file" "$url"
  fi
  [ "$(sha512sum "$file")" = "$hash_output" ]
)

xerces_git_uri="https://github.com/apache/xerces-c.git"
xerces_git_branch="v3.2.3"

if [ "$compiler" = "vc15" ]; then
(
  if [ ! -f /cygdrive/c/tools/vcpkg/installed/x64-windows/bin/xerces-c_3_2.dll ]; then
    cd "$(cygpath -u "c:\\tools\\vcpkg")"
    git pull
    ./bootstrap-vcpkg.bat
    ./vcpkg install xerces-c:x64-windows

    if [ "$transcoder" = "icu" ]; then
      vcpkg install icu:x64-windows
    fi
  fi
)
else
(
    cd "$AV_PROJECTS"
    echo "AV_XERCES_SOURCE=$AV_XERCES_SOURCE"
    echo "cygpath AV_XERCES_SOURCE=$(cygpath -u "${AV_XERCES_SOURCE}")"
    git clone -b "$xerces_git_branch" "$xerces_git_uri" "$(cygpath -u "${AV_XERCES_SOURCE}")"
)
fi