-
Notifications
You must be signed in to change notification settings - Fork 431
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
Conversation
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') |
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.
Does -E
change how that \\s
is interpreted?
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.
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...
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.
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.
No description provided.