Skip to content

Commit

Permalink
fix: 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)
  • Loading branch information
j23414 committed Apr 18, 2023
1 parent 54f091a commit 1e592bd
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 1e592bd

Please sign in to comment.