Skip to content

Commit

Permalink
[nextstrain stylistic choice] Use curl for downloading files
Browse files Browse the repository at this point in the history
Pick curl instead of detecting curl/wget as discussed in:
nextstrain/ebola#6 (comment)

Co-authored-by: John Huddleston <huddlej@gmail.com>
  • Loading branch information
j23414 and huddlej committed May 5, 2023
1 parent b7817ed commit c4f1955
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions ingest/workflow/snakemake_rules/transform.smk
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,7 @@ rule fetch_general_geolocation_rules:
geolocation_rules_url=config["transform"]["geolocation_rules_url"],
shell:
"""
# (1) Pick curl or wget based on availability
if which curl > /dev/null; then
download_cmd="curl -fsSL --output"
elif which wget > /dev/null; then
download_cmd="wget -O"
else
echo "ERROR: Neither curl nor wget found. Please install one of them."
exit 1
fi
# (2) Fetch general geolocation rules
$download_cmd {output.general_geolocation_rules} {params.geolocation_rules_url}
curl -fsSL --output {output.general_geolocation_rules} {params.geolocation_rules_url}
"""


Expand Down

0 comments on commit c4f1955

Please sign in to comment.