#!/bin/bash if [ $# -ne 1 ] ; then echo "usage: install-mingw.sh " 1>&2 exit 1 fi unpack_dir=$1 if [ -e "$unpack_dir" ] ; then echo "Destination directory already exists; please delete it if you are sure" 1>&2 exit 1 fi set -e download_dir=/tmp/install-mingw.$$ mkdir -p $download_dir $unpack_dir while read f ; do wget -P $download_dir -N http://switch.dl.sourceforge.net/project/mingw/$f done <&2 exit 1 ;; esac done rm -rf $download_dir