From 8b9f8bf022877c85f439d344b2e83b1d407b4995 Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Fri, 27 Sep 2019 20:07:42 +0200 Subject: [PATCH] Add travis support --- .travis.yml | 23 +++++++++++++++++++++++ scripts/create_sibling.sh | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..b1737097 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +dist: bionic +language: generic +env: + global: + - LANG=C + - LC_ALL=C +before_cache: +- mountpoint -q $TRAVIS_BUILD_DIR/tmp/mnt && sudo umount -R $TRAVIS_BUILD_DIR/tmp/mnt +- sudo find $TRAVIS_BUILD_DIR/tmp/ -name '*.img' -delete +cache: + apt: true + directories: + - tmp/ +before_script: +- sudo apt-get -y update +- sudo apt-get -y install qemu-user-static binfmt-support qemu +- sudo update-binfmts --display +- unset GOROOT +script: +- sudo ./scripts/create_sibling.sh -n pwnagotchi -o pwnagotchi.img -s 4 +- zip -s 2g pwnagotchi.zip pwnagotchi.img + +# TODO: deploy! diff --git a/scripts/create_sibling.sh b/scripts/create_sibling.sh index 6894fa09..81bff79a 100755 --- a/scripts/create_sibling.sh +++ b/scripts/create_sibling.sh @@ -85,7 +85,7 @@ function setup_raspbian(){ parted -s "$LOOP_PATH" rm 2 parted -s "$LOOP_PATH" mkpart primary "$PART2_START" 100% echo "[+] Check FS" - e2fsck -f "${LOOP_PATH}p2" + e2fsck -y -f "${LOOP_PATH}p2" echo "[+] Resize FS" resize2fs "${LOOP_PATH}p2" echo "[+] Device is ${LOOP_PATH}" @@ -153,7 +153,7 @@ function provision_raspbian() { pip3 install gast==0.2.2 /dev/null 2>&1 + pip3 install --progress-bar off {} # waveshare pip3 install spidev RPi.GPIO