Skip to content
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

Clean up css and bash scripts #2972

Merged
merged 12 commits into from
Jul 31, 2023

Conversation

elahrvivaz
Copy link
Contributor

No description provided.

reg=$(echo "${dep% *}" | sed 's/\s\s*/\\s*/g')
if [ -z "$(grep $reg build/cqs.tsv)" ]; then
dep="$(echo "$cq" | sed -E 's/(.*):(.*):jar:(.*):(\w*)/\1:\2\t\3\t\4/')"
reg=$(echo "${dep% *}" | sed -E 's/\s\s*/\\s*/g')
Copy link
Contributor

Choose a reason for hiding this comment

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

Does -E change how that \\s is interpreted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so... according to this it only affects ?, +, () and {}. I think I just was trying to be consistent, and -E makes sed behave similar to most other regex engines where you have to escape those characters to treat them as literals (vs the opposite), so it seems like adding it everywhere might make things a little more consistent...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually i remember now... the shellcheck throws out a warning to consider using ${arg/match/replacement} instead of piping to sed - but if you use sed -E then it doesn't complain :P

in this case the variable replacement doesn't work, so we have to use sed. could alternatively mark the issue as "resolved" in github so it doesn't complain i guess.

@elahrvivaz elahrvivaz merged commit d777de3 into locationtech:main Jul 31, 2023
19 checks passed
@elahrvivaz elahrvivaz deleted the fcr_codacy_cleanup branch July 31, 2023 13:58
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