Skip to content

uls-fetch: correctly download weekly zip files#2

Open
molo1134 wants to merge 1 commit intoQueuingKoala:masterfrom
molo1134:fix/weekly_files
Open

uls-fetch: correctly download weekly zip files#2
molo1134 wants to merge 1 commit intoQueuingKoala:masterfrom
molo1134:fix/weekly_files

Conversation

@molo1134
Copy link
Copy Markdown

@molo1134 molo1134 commented Nov 4, 2021

No description provided.

Copy link
Copy Markdown
Owner

@QueuingKoala QueuingKoala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a small tweak, this looks good; see inline comments.

Comment thread uls-fetch.sh

al_type="${fn#*_}"
al_type="${al_type%%_*}"
al_type="${al_type%%.info}"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch on the suffix removal.

Could this be changed to either shortest-trailing, %.info or longest-trailing %%.* instead? A non-glob string won't benefit from longest-match. Between the above options, a glob makes it easier for alternative suffixes to be used in the future (like .info.txt) but may impair meaning as this is already hard-coded elsewhere. Either works for me as more direct, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants