Make it work / modernize script#3
Open
drwetter wants to merge 1 commit into
Open
Conversation
Thanks for the script. I made the script more usable: * clamdscan maybe isn't installed) * lockfile wasn't installed under Debian. You can as well remove that line as it is not used in the script * tmpdir generation maybe had a race condition = security problem due to foreseeable filename. Under bash one can use [[ ]] instead of []. One should use POSX notation $(expression) instead of `expression`. It works for me. You might want to double check though.
mkilijanek
reviewed
Apr 18, 2022
mkilijanek
left a comment
There was a problem hiding this comment.
This change assumes usage of Bash as shell. On Linux it might be true, but on e.g. FreeBSD Bash is not installed at all by default. Using Bash only syntax limits usage of script to Linux only. More specific: to Linux only run from user context, not by scripting shell. Even Dash (Debian default scripting shell) is not supporting Bashisms.
Author
|
err... see first line. |
|
@abusech can you clarify if your shell script should work under Bash only or be platform independent? Can you clarify what is your take on that matter, to avoid confusion? Should we use Bash or be POSIX complaint? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for the script.
I made the script more usable:
Under bash one can use [[ ]] instead of []. One should use POSX notation $(expression) instead of
expression.It works for me. You might want to double check though.