mirror of
				https://github.com/the-sane/lug-helper.git
				synced 2025-11-04 16:03:20 +00:00 
			
		
		
		
	awk can't always be trusted for math (mawk bad)
This commit is contained in:
		@@ -901,9 +901,11 @@ winetricks_check() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Check system memory and swap space
 | 
					# Check system memory and swap space
 | 
				
			||||||
memory_check() {
 | 
					memory_check() {
 | 
				
			||||||
    # Get totals in bytes
 | 
					    # Get totals in KB
 | 
				
			||||||
    memtotal="$(LC_NUMERIC=C awk '/MemTotal/ {printf $2*1024}' /proc/meminfo)"
 | 
					    memtotal="$(LC_NUMERIC=C awk '/MemTotal/ {printf $2}' /proc/meminfo)"
 | 
				
			||||||
    swaptotal="$(LC_NUMERIC=C awk '/SwapTotal/ {printf $2*1024}' /proc/meminfo)"
 | 
					    swaptotal="$(LC_NUMERIC=C awk '/SwapTotal/ {printf $2}' /proc/meminfo)"
 | 
				
			||||||
 | 
					    memtotal="$(($memtotal * 1024))"
 | 
				
			||||||
 | 
					    swaptotal="$(($swaptotal * 1024))"
 | 
				
			||||||
    combtotal="$(($memtotal + $swaptotal))"
 | 
					    combtotal="$(($memtotal + $swaptotal))"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Convert to GiB
 | 
					    # Convert to GiB
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user