summaryrefslogtreecommitdiff
path: root/.travis/cmake-freebsd-stage1
diff options
context:
space:
mode:
Diffstat (limited to '.travis/cmake-freebsd-stage1')
-rwxr-xr-x.travis/cmake-freebsd-stage147
1 files changed, 24 insertions, 23 deletions
diff --git a/.travis/cmake-freebsd-stage1 b/.travis/cmake-freebsd-stage1
index 6a88ed44..29667e82 100755
--- a/.travis/cmake-freebsd-stage1
+++ b/.travis/cmake-freebsd-stage1
@@ -1,4 +1,4 @@
1#!/bin/sh 1#!/bin/bash
2 2
3# Download and initial setup of the FreeBSD VM 3# Download and initial setup of the FreeBSD VM
4 4
@@ -9,7 +9,7 @@ set -eux
9. .travis/cmake-freebsd-env.sh 9. .travis/cmake-freebsd-env.sh
10 10
11travis_install() { 11travis_install() {
12 git tag -l --sort=version:refname > GIT_TAGS 12 git tag -l --sort=version:refname >GIT_TAGS
13 13
14 OLD_PWD="$PWD" 14 OLD_PWD="$PWD"
15 15
@@ -19,9 +19,9 @@ travis_install() {
19 # === Get the VM image, set it up and cache === 19 # === Get the VM image, set it up and cache ===
20 20
21 # Create image if it's not cached, or if this build script has changed, or a new toxcore tag was pushed 21 # Create image if it's not cached, or if this build script has changed, or a new toxcore tag was pushed
22 sha256sum "$OLD_PWD/.travis/cmake-freebsd-env.sh" > /tmp/sha 22 sha256sum "$OLD_PWD/.travis/cmake-freebsd-env.sh" >/tmp/sha
23 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1" >> /tmp/sha 23 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1" >>/tmp/sha
24 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1.expect" >> /tmp/sha 24 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1.expect" >>/tmp/sha
25 if [ ! -f "./$IMAGE_NAME.tgz" ] || [ ! -f ./cmake-freebsd-stage1-all.sha256 ] || [ "$(cat cmake-freebsd-stage1-all.sha256)" != "$(cat /tmp/sha)" ] || ! diff -u ./GIT_TAGS "$OLD_PWD/GIT_TAGS"; then 25 if [ ! -f "./$IMAGE_NAME.tgz" ] || [ ! -f ./cmake-freebsd-stage1-all.sha256 ] || [ "$(cat cmake-freebsd-stage1-all.sha256)" != "$(cat /tmp/sha)" ] || ! diff -u ./GIT_TAGS "$OLD_PWD/GIT_TAGS"; then
26 rm -rf ./* 26 rm -rf ./*
27 27
@@ -42,8 +42,8 @@ travis_install() {
42 DL_MIRROR_11=14 42 DL_MIRROR_11=14
43 43
44 # There are 11 mirrors 44 # There are 11 mirrors
45 DL_MIRROR_RANDOM=`expr $(date +%s) % 11 + 1` 45 DL_MIRROR_RANDOM=$(expr "$(date +%s)" % 11 + 1)
46 DL_URL="ftp://ftp$(eval echo \$DL_MIRROR_$DL_MIRROR_RANDOM).us.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/${FREEBSD_VERSION}-RELEASE/amd64/Latest/${IMAGE_NAME}.xz" 46 DL_URL="ftp://ftp$(eval echo \$DL_MIRROR_"$DL_MIRROR_RANDOM").us.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/$FREEBSD_VERSION-RELEASE/amd64/Latest/$IMAGE_NAME.xz"
47 47
48 # Make sure there are no partial downloads from the previous loop iterations 48 # Make sure there are no partial downloads from the previous loop iterations
49 rm -rf ./* 49 rm -rf ./*
@@ -51,7 +51,7 @@ travis_install() {
51 wget --tries 1 "$DL_URL" && break 51 wget --tries 1 "$DL_URL" && break
52 done 52 done
53 53
54 if ! ( echo "$IMAGE_SHA512 $IMAGE_NAME.xz" | sha512sum -c --status - ) ; then 54 if ! (echo "$IMAGE_SHA512 $IMAGE_NAME.xz" | sha512sum -c --status -); then
55 echo "Error: sha512 of $IMAGE_NAME.xz doesn't match the known one" 55 echo "Error: sha512 of $IMAGE_NAME.xz doesn't match the known one"
56 exit 1 56 exit 1
57 fi 57 fi
@@ -81,18 +81,19 @@ travis_install() {
81 RUN chsh -s /usr/local/bin/bash root 81 RUN chsh -s /usr/local/bin/bash root
82 82
83 # Install required toxcore dependencies 83 # Install required toxcore dependencies
84 RUN PAGER=cat ASSUME_ALWAYS_YES=YES pkg install git \ 84 RUN PAGER=cat ASSUME_ALWAYS_YES=YES pkg install \
85 opus \ 85 git \
86 libconfig \ 86 opus \
87 libvpx \ 87 libconfig \
88 libsodium \ 88 libvpx \
89 gmake \ 89 libsodium \
90 cmake \ 90 gmake \
91 pkgconf \ 91 cmake \
92 portaudio \ 92 pkgconf \
93 libsndfile \ 93 portaudio \
94 texinfo \ 94 libsndfile \
95 autotools 95 texinfo \
96 autotools
96 97
97 # === Cache the VM image === 98 # === Cache the VM image ===
98 99
@@ -103,9 +104,9 @@ travis_install() {
103 rm "$IMAGE_NAME" 104 rm "$IMAGE_NAME"
104 105
105 cp "$OLD_PWD/GIT_TAGS" . 106 cp "$OLD_PWD/GIT_TAGS" .
106 sha256sum "$OLD_PWD/.travis/cmake-freebsd-env.sh" > cmake-freebsd-stage1-all.sha256 107 sha256sum "$OLD_PWD/.travis/cmake-freebsd-env.sh" >cmake-freebsd-stage1-all.sha256
107 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1" >> cmake-freebsd-stage1-all.sha256 108 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1" >>cmake-freebsd-stage1-all.sha256
108 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1.expect" >> cmake-freebsd-stage1-all.sha256 109 sha256sum "$OLD_PWD/.travis/cmake-freebsd-stage1.expect" >>cmake-freebsd-stage1-all.sha256
109 ls -lh 110 ls -lh
110 fi 111 fi
111 112