#!/bin/bash -x cat $(ls -tr /tmp/build-openwrt-dev.sh_* | tail -n1) \ | sed -ne 's#[^=]\+=> Downloading http://downloads.openwrt.org/\(.*\)\.$#wget http://downloads.openwrt.org/\1 -O /var/www/openwrt/\1#p' \ | cat # | bash