#!/bin/sh

DIR=$1

if test "$1" = "" ; then
  echo "Usage: expandg30 <directory_where_gtopo30_data_are>"
  exit
fi

LIST=`/bin/ls $DIR/w* $DIR/e*`

for i in $LIST ;
do
  j=`basename $i | cut -d"." -f 1 | tr "a-z" "A-Z"`
  echo "$i --> $j.DEM"
  tar xvfz $i $j.DEM
done

