crouton
crouton copied to clipboard
Size tests
Per Issue https://github.com/dnschneid/crouton/issues/2108 - Add destination size tests: If the CHROOTS partition size is less than 4 GB, spit out a warning. If CHROOTS free space is less than 2GB, spit out a warning. Also, determine whether the former is due to a Chrubuntu install.
Thanks for the patch!! Catching up on reviewing things now :)
Thanks for the patch!! Catching up on reviewing things now :)
Thank you for all the help and time out of your busy schedule. :)
I apologize for all the misstarts ( I'm trying, very trying ;).
You're doing great!
You're doing great!
Well I certanly don't think so, it's down right embarrassking!
I was thinking of changing some of my calculations to use decimals.
The current ones are similar to:
local size_gb="$((${size}/1000))GB"
When size is 19588, it yields '19GB'
I'd like to change them to:
local size_gb="$(echo "$size 1000" | awk '{printf "%.2f\n", $1/$2}') GB"
When size is 19588, it yields '19.58 GB'
I wanted to check with y'all and see if that's something worthwhile doing ???
I would just round to 20GB It's not like you can buy a 19.58GB storage device ?? ;)
Okay, thanx. I'll leave them as is then probably.
If you want it to round up you can do something like:
local size_gb="$(((${size}+500)/1000))GB"
I'm not sure which is preferable...
You could also consider using "df -mh" which will give you the size in 'human' readable format, such as 20GB.
Yup, thought about that but it's just a little harder to test sizes when in a 'human' readable format. I'm happy with the way it is now unless we want to add the 'echo_color' attributes before it's merged.
I think this is ready to go but you might want to review it again, it's been a while.
@DennisLfromGA Let me know if you want me to test. During some wild attempts to get my Chromebook (Toshiba 2 2015) to run android apps, I lost Crouton, so have to reinstall, probably this weekend.
@tedm, Go for it and let us know, thanx.