#!/bin/sh # downloads a file to toolchain/cache unless it's already present there mkdir -p cache/toolchain OUT="cache/toolchain/$(basename $1)" [ -e "$OUT" ] && exit echo "downloading $1..." curl "$1" > $OUT