Optimize OS/release/version detection for faster execution #70
No reviewers
Labels
No labels
bug
bullseye
discussion
duplicate
enhancement
help wanted
invalid
question
suggestion
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Depends on
#69 Don't execute `lsb_release` more than once
evolix/evocheck
Reference: evolix/evocheck#70
Loading…
Reference in a new issue
No description provided.
Delete branch "fast-debian-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related to #69
@ -128,0 +130,4 @@
if [ -e /etc/debian_version ]; then
DEBIAN_RELEASE=$(lsb_release -c -s)
DEBIAN_VERSION=$(cat /etc/debian_version |cut -d "." -f 1)
Useless cat+pipe.
@ -162,0 +186,4 @@
test "${DEBIAN_RELEASE}" = "stretch"
}
debian_release() {
printf "%s" "${DEBIAN_RELEASE}"
printf is very useful when you want to replace many strings, but for one?
is largely sufficient.
there is the question of the newline at the end, and I can't remember is it's a POSIX option.
You mean
echo -n
?BTW this function is not used? I don't see any call.
I've rebased on master to resolve conflicts
It would be cool to merge this PR, so we could focus on the others based on this one.
@benpro You're right, the rebase was messed up. I've done it again. I hope it's good this time.
Beware it has moved at line 162.
LGTM. @vlaborie Review welcome.
@vlaborie tell me if you'd like to do a pair-review.
@benpro: Let's merge this, and then merge #75