]> git.proxmox.com Git - rustc.git/blob - vendor/mdbook/ci/install.sh
New upstream version 1.33.0+dfsg1
[rustc.git] / vendor / mdbook / ci / install.sh
1 set -ex
2
3 main() {
4 local target=
5 if [ $TRAVIS_OS_NAME = linux ]; then
6 target=x86_64-unknown-linux-musl
7 sort=sort
8 else
9 target=x86_64-apple-darwin
10 sort=gsort # for `sort --sort-version`, from brew's coreutils.
11 fi
12
13 # Builds for iOS are done on OSX, but require the specific target to be
14 # installed.
15 case $TARGET in
16 aarch64-apple-ios)
17 rustup target install aarch64-apple-ios
18 ;;
19 armv7-apple-ios)
20 rustup target install armv7-apple-ios
21 ;;
22 armv7s-apple-ios)
23 rustup target install armv7s-apple-ios
24 ;;
25 i386-apple-ios)
26 rustup target install i386-apple-ios
27 ;;
28 x86_64-apple-ios)
29 rustup target install x86_64-apple-ios
30 ;;
31 esac
32
33 # This fetches latest stable release
34 local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
35 | cut -d/ -f3 \
36 | grep -E '^v[0.1.0-9.]+$' \
37 | $sort --version-sort \
38 | tail -n1)
39 curl -LSfs https://japaric.github.io/trust/install.sh | \
40 sh -s -- \
41 --force \
42 --git japaric/cross \
43 --tag $tag \
44 --target $target
45 }
46
47 main