#! /bin/bash
set -e
mkdir -p ./tmp ./raspbian
cd ./tmp
wget -nv https://downloads.raspberrypi.org/raspbian_lite_latest -O raspbian_lite_latest.zip
rm -vf *raspbian*.img
unzip ./raspbian_lite_latest.zip
sudo losetup -P /dev/loop9 `ls *raspbian*.img`
cd ..
sudo mount /dev/loop9p2 ./raspbian

#docker run -v $(pwd):/raspbian --rm wapmobil/debian bash make_sysroot.sh
