Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/bin/fetch_osc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@

if [[ -z $1 ]]; then
{
echo Usage: $0 Replicate_id Source_dir Local_dir
echo Usage: $0 Replicate_id Source_dir Local_dir [Sleep]
exit 0
};
fi

REPLICATE_ID=$1
SOURCE_DIR=$2
LOCAL_DIR=$3
SLEEP_BETWEEN_DLS=${4:-15} # How long to sleep between download attempts (sec). Default: 15

if [[ ! -d $LOCAL_DIR ]];
then {
Expand All @@ -53,7 +54,7 @@ retry_fetch_file()
}; fi
}; fi
until [[ -s "$2" ]]; do {
sleep 15
sleep $SLEEP_BETWEEN_DLS
fetch_file "$1" "$2"
if [[ "$3" == "gzip" ]]; then {
gunzip -t <"$2"
Expand Down