From bbee76e66c37b4abd5373fbc3f702f82b3f10d41 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sun, 6 May 2018 00:55:57 +0200 Subject: [PATCH] Add more debug info to travis rpi cfg --- .travis.yml | 2 +- scripts/ci/rpi/mkimage.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 999a437..57619d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ matrix: - os: linux dist: trusty sudo: required - env: TARGET="rpi" SCRIPT="pisetup.sh" IMAGE="opm-${TRAVIS_TAG}.img" RPI_ZIP="raspbian_lite-2017-07-05-of_v0.9.8.img.zip" RPI_URL="https://github.com/kr15h/openframeworks-rpi-image/releases/download/v1.0.0/${RPI_ZIP}" + env: TARGET="rpi" SCRIPT="pisetup.sh" IMAGE="opm${TRAVIS_TAG}.img" RPI_ZIP="raspbian_lite-2017-07-05-of_v0.9.8.img.zip" RPI_URL="https://github.com/kr15h/openframeworks-rpi-image/releases/download/v1.0.0/${RPI_ZIP}" addons: apt: packages: diff --git a/scripts/ci/rpi/mkimage.sh b/scripts/ci/rpi/mkimage.sh index 3c66b7b..e9b2776 100644 --- a/scripts/ci/rpi/mkimage.sh +++ b/scripts/ci/rpi/mkimage.sh @@ -37,6 +37,9 @@ trap cleanup EXIT # Download raspbian arm only if we have not already done so [ ! -f "${RPI_ZIP}" ] && wget "${RPI_URL}" +# Clean the existing image files +(ls *.img >> /dev/null 2>&1 && rm *.img) || echo "no .img files to remove" + # Unzip Raspbian # -u update files, create if necessary unzip -u "${RPI_ZIP}" @@ -44,6 +47,7 @@ unzip -u "${RPI_ZIP}" mv "$(ls *.img | head -n 1)" "${IMAGE}" # Configure loopback device to expand partition 2 +losetup -f loopdev=$(losetup --find --show "${IMAGE}") echo "Created loopback device ${loopdev}" echo "Mounting filesystem."