Skip to content

Commit

Permalink
Avoid asking the user in which directory they are in
Browse files Browse the repository at this point in the history
If this feature is needed it's probably best to support overriding this
with environment variables yet from the looks of it that is not actually
needed.

This script can perhaps be refactored a bit overall too.
  • Loading branch information
hellais committed Apr 23, 2019
1 parent b582f8c commit 03af05e
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,9 @@
# --------------------------------------------------------------------------- #

curr_dir=`pwd`

#Get top level directory of ww3 from user:
echo -e "\n\n This script will download data from the ftp for WAVEWATCH III "
echo -e "Enter the relative path to the main/top level directory, this would "
echo -e "be '../../' if in the model/bin directory or '.' if already in the "
echo -e "top/main directory:"
read ww3dir

#Move to top level directory of ww3:
cd $ww3dir
ww3dir="$(cd "$(dirname "$0")";pwd -P)/../.."
#Move to top level directory of ww3:
cd $ww3dir

#Download from ftp and uptar:
echo -e "Downloading and untaring file from ftp:"
Expand Down Expand Up @@ -64,6 +57,6 @@ else
echo -e ' Not deleting the data_regtests folder.'
fi

#move back to original directory:
#move back to original directory:
cd $curr_dir
echo -e "End of ww3_from_ftp.sh"

0 comments on commit 03af05e

Please sign in to comment.