-
Notifications
You must be signed in to change notification settings - Fork 422
Fix purge_paths in sync-r2.sh by removing unnecessary leading slashes
#178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
Conversation
Fix cut command to use -c instead of --characters.
| purge_paths+=("/${path}") | ||
| done < <(find . \( -wholename '*/list.*' -o -wholename '*/*-latest' -o -wholename '*/*-latest.*' \) | cut --characters 2-) | ||
| purge_paths+=("${path}") | ||
| done < <(find . \( -wholename '*/list.*' -o -wholename '*/*-latest' -o -wholename '*/*-latest.*' \) | cut -c 2-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change to -c is needed? I see the commit message: "Correct cut command in sync-r2.sh" but I don't know for what reason you cannot use --characters. The man page says:
-c, --characters=LIST select only these charactersSo both options should be valid. Is this an issue with the current version of cut being used by the GH action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, sorry it's just that on osx (where I tested the script) cut doesn't support --character but only -c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why we can't have nice things :(
The outdated shell utils that macOS ships with are a pain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, sorry it's just that on osx (where I tested the script) cut doesn't support --character but only -c.
Right, so can you revert that change?
r0qs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides one comment. The PR looks good to me.
purge_paths in sync-r2.sh
Co-authored-by: Kamil Śliwak <[email protected]>
purge_paths in sync-r2.shpurge_paths in sync-r2.sh by removing unnecessary leading slashes
purge_paths in sync-r2.sh by removing unnecessary leading slashespurge_paths in sync-r2.sh by removing unnecessary leading slashes
purge_paths, a list containing the files to be purged was created by adding resources with the wrong path "https://binaries.soliditylang.org//bin/list.json" instead of "https://binaries.soliditylang.org/bin/list.json" (notice the double slash beforebin/list.json).