mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
commit
5ba5a7df46
13
tools/free_space.awk
Normal file
13
tools/free_space.awk
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/awk -f
|
||||
|
||||
# Usage: tools/free_space.awk pokecrystal.map
|
||||
|
||||
BEGIN {
|
||||
total = free = 16384 * 128
|
||||
}
|
||||
/^ SECTION: \$[0-7]/ {
|
||||
free -= strtonum("0x" substr($3, 3))
|
||||
}
|
||||
END {
|
||||
printf "Free space: %d/%d (%.2f%%)\n", free, total, free * 100 / total
|
||||
}
|
Loading…
Reference in New Issue
Block a user