#!/bin/sh

###############################################################################
# Program: download.source
# Purpose: Download the required source balls to build the package
# Author : Stuart Winter <stuart@polplex.co.uk>
###############################################################################
# Download sites#
#################
# http://www.ibiblio.org/pub/linux/system/backup/afio-2.4.7.tgz
###############################################################################

ORIGPATH="$( pwd )"
cd ${ORIGPATH}

mkdir source 2>/dev/null
cd source

function grab_sourceball () {
local URL="$1"
local file="$( echo ${URL} | rev | cut -d/ -f1 | rev )"
if [ ! -f ${file} ]; then
   echo "Downloading ${URL}"
   wget -N ${URL}
 else
   echo "Already have ${file}, skipping.."
fi
}

grab_sourceball "http://www.ibiblio.org/pub/linux/system/backup/afio-2.4.7.tgz"

#EOF

