Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace [ expr ] with [[ expr ]] and (( expr )) #382

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

AllKind
Copy link
Contributor

@AllKind AllKind commented Dec 15, 2023

In regard of: #268.
Replaced all instances of [ expr ] I could find with [[ expr ]], or (( expr )).
Also removed the now obsolete quoting.
Some unnecessary grouped conditional commands have been consolidated.

@AllKind AllKind changed the title Replace [ expr ]' with [[ expr ]]' and (( expr )) Replace [ expr ] with [[ expr ]] and (( expr )) Dec 15, 2023
In regard of: dell#268.
Replaced all instances of `[ expr ]' I could find with
`[[ expr ]]', or `(( expr ))'.
Also removed the now obsolete quoting.
Some unnecessary grouped conditional commands have been
consolidated.

Signed-off-by: Mart Frauenlob <AllKind@fastest.cc>
@@ -334,20 +334,20 @@ do_depmod()
return
fi
# $1 = kernel version
if [ "${current_os}" != "Linux" ] ; then
if [[ ${current_os} != Linux ]] ; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you're changing these, can you please drop the curly brackets as well?

Thanks o/

Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment applies for the whole patch.

Cases like substring and array handling (further down) obviously need to retain the curly brackets to work.

@AllKind
Copy link
Contributor Author

AllKind commented Jan 31, 2024

As this is inconsistent across the whole program, I'd prefer to do that in a separate PR.

@evelikov
Copy link
Collaborator

Indeed, things are a bit messy atm. Fixing it in as follow-up PR is fine.

Thanks for this, merging

@evelikov evelikov merged commit ce9895b into dell:master Jan 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants