-
Notifications
You must be signed in to change notification settings - Fork 33
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
coreutils #81
Comments
Oh thank you for reporting! I'll look into adding a check for it. And about readarray - you're right, its from bash 5.0.17, maybe I should look into changing that back to what it was before to make it compatible with older environments.. Did a change back in april: 86649fb from: IFS=$'\n'
NoUpdates=($(sort <<<"${NoUpdates[*]}"))
GotUpdates=($(sort <<<"${GotUpdates[*]}"))
GotErrors=($(sort <<<"${GotErrors[*]}"))
unset IFS to: readarray -td '' NoUpdates < <(printf '%s\0' "${NoUpdates[@]}" | sort -z -n)
readarray -td '' GotUpdates < <(printf '%s\0' "${GotUpdates[@]}" | sort -z -n)
readarray -td '' GotErrors < <(printf '%s\0' "${GotErrors[@]}" | sort -z -n) Could maybe use the old way still (was no issues) or rewrite it to something like mapfile or read -a. Might look into it in the future. |
Just did a push to a new branch to solve the timeout / non-coreutils, so it wont try to timeout if the binary doesn't exist. |
Might test to re-write the sorting of arrays to something like this to make it compatible with more (and older) shells. read -r -a NoUpdates <<< "$(sort <<<"${NoUpdates[*]}")"
read -r -a GotUpdates <<< "$(sort <<<"${GotUpdates[*]}")"
read -r -a GotErrors <<< "$(sort <<<"${GotErrors[*]}")" But gotta do some more testing, just a thought atm. |
Hi Mag37, |
Yeah no worries, thank you. I'll do some more testing on the sorting :) But I think the main issue - the timeout breakage, should be sorted in the branch I linked. https://github.com/mag37/dockcheck/tree/tfix So if you still got a machine without coreutils you could test that dockcheck.sh. I'll push it to main as soon as I've done some more testing. |
Hi again,
I have removed coreutils-timeout. I am able to update containers without the timeout error, but in the top of the script i get this error, as descibed earlier:
but this is obviously expected. |
Happy to hear the timeout-bit works at least! read -r -a NoUpdates <<< "$(sort <<<"${NoUpdates[*]}")"
read -r -a GotUpdates <<< "$(sort <<<"${GotUpdates[*]}")"
read -r -a GotErrors <<< "$(sort <<<"${GotErrors[*]}")" Should work with older bash versions, I hope.. |
This works perfect.
|
Wonderful! Thank you for testing, I'll test further tonight and push it to main if all goes well :) |
I did settle on just using the old syntax for the array sorting, pushing it to main right now. Let me know if you hit any issues! |
Hi,
Thanks for a great tool. I have been using this for quite a long time, as I can selectively choose what to update.
With the latest version I have had a number of issues, and I have finally figured out that it is because coreutils was not installed.
Would it make sense to add a check for this, just like regctl?
I use this script on a qnap nas, and was able to download coreutils-timeout using opkg. :o)
Edit: I also had some problems with the "readarray" command, but turned out I could update bash, to solve this.
/B
The text was updated successfully, but these errors were encountered: