# Depends on static-linux-hea

# Exit on error:
set -e

wget http://landley.net/toybox/downloads/toybox-0.7.1.tar.gz
tar xf toybox-0.7.1.tar.gz
cd toybox-0.7.1
make defconfig

CC=/static/bin/musl-gcc \
    LDFLAGS='-s -L/static/lib -static -static-libgcc' \
    make toybox

install toybox /static/bin
cd ..
rm -rf toybox-0.7.1
rm toybox-0.7.1.tar.gz
exit 0

