mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 07:02:50 +01:00
fix: handle floats
This commit is contained in:
1 parent
43087b44d4
commit
d214d40ad5
2 files changed
+52
-30
No files matched your search
+1
-1
@@ -291,7 +291,7 @@ list_mods(){
|
||||
name=$(awk -F\" '/name/ {print $2}' "${dir}/meta.cpp")
|
||||
base_dir=$(basename $(readlink -f $game_dir/$symlink))
|
||||
size=$(du -s "$(readlink -f "$game_dir/$symlink")" | awk '{print $1}')
|
||||
size=$(echo "scale=4; ($size / 1024) + .005" | bc)
|
||||
size=$(python3 -c "n=($size/1024) +.005; print(round(n,4))")
|
||||
printf "%s$sep%s$sep%s$sep%3.3f\n" "$name" "$symlink" "$base_dir" "$size"
|
||||
done | sort -k1
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user