mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 12:21:11 +00:00
Merge branch 'main' of github.com:tw93/Mole
This commit is contained in:
@@ -397,7 +397,10 @@ ensure_user_file() {
|
|||||||
# Convert bytes to human-readable format (e.g., 1.5GB)
|
# Convert bytes to human-readable format (e.g., 1.5GB)
|
||||||
bytes_to_human() {
|
bytes_to_human() {
|
||||||
local bytes="$1"
|
local bytes="$1"
|
||||||
[[ "$bytes" =~ ^[0-9]+$ ]] || { echo "0B"; return 1; }
|
[[ "$bytes" =~ ^[0-9]+$ ]] || {
|
||||||
|
echo "0B"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# GB: >= 1073741824 bytes
|
# GB: >= 1073741824 bytes
|
||||||
if ((bytes >= 1073741824)); then
|
if ((bytes >= 1073741824)); then
|
||||||
|
|||||||
Reference in New Issue
Block a user