#!/bin/bash

set -e  # Exit immediately if a simple command exits with a non-zero status
set -u  # Treat unset variables as an error
        # when performing parameter expansion.

#set -x # Print commands and their arguments as they are executed.

GFF_BASEURL="ftp://flybase.net/genomes/Drosophila_melanogaster/dmel_r5.1/gff"

GFF_FILES="dmel-2L-r5.1.gff.gz
           dmel-2R-r5.1.gff.gz
           dmel-3L-r5.1.gff.gz
           dmel-3R-r5.1.gff.gz
           dmel-4-r5.1.gff.gz
           dmel-X-r5.1.gff.gz
           dmel-dmel_mitochondrion_genome-r5.1.gff.gz"

for file in $GFF_FILES; do
    url="$GFF_BASEURL/$file"
    wget $url    
done
