mirror of
				https://github.com/the-sane/lug-helper.git
				synced 2025-10-31 17:58:33 +00:00 
			
		
		
		
	Performance improvements
This commit is contained in:
		| @@ -896,7 +896,7 @@ winetricks_check() { | |||||||
| # Check total system memory | # Check total system memory | ||||||
| memory_check() { | memory_check() { | ||||||
|     memtotal="$(LC_NUMERIC=C awk '/MemTotal/ {printf "%.1f \n", $2/1024/1024}' /proc/meminfo)" |     memtotal="$(LC_NUMERIC=C awk '/MemTotal/ {printf "%.1f \n", $2/1024/1024}' /proc/meminfo)" | ||||||
|     if [ ${memtotal%.*} -ge "15" ]; then |     if [ "${memtotal%.*}" -ge "15" ]; then | ||||||
|         preflight_pass+=("Your system has $memtotal GB of memory.") |         preflight_pass+=("Your system has $memtotal GB of memory.") | ||||||
|     else |     else | ||||||
|         preflight_fail+=("Your system has $memtotal GB of memory.\nWe recommend at least 16 GB to avoid crashes.") |         preflight_fail+=("Your system has $memtotal GB of memory.\nWe recommend at least 16 GB to avoid crashes.") | ||||||
| @@ -914,7 +914,7 @@ avx_check() { | |||||||
|  |  | ||||||
| # Check if swap is set up | # Check if swap is set up | ||||||
| swap_check() { | swap_check() { | ||||||
|     if cat /proc/swaps | grep -vq "Filename"; then |     if grep -vq "Filename" /proc/swaps; then | ||||||
|         preflight_pass+=("You have swap space configured.") |         preflight_pass+=("You have swap space configured.") | ||||||
|     else |     else | ||||||
|         preflight_fail+=("You don't appear to have swap space configured.\nWe recommend configuring an 8-16 GB swap file.") |         preflight_fail+=("You don't appear to have swap space configured.\nWe recommend configuring an 8-16 GB swap file.") | ||||||
| @@ -1001,7 +1001,7 @@ preflight_check() { | |||||||
|             done |             done | ||||||
|  |  | ||||||
|             # Execute the actions set by the functions |             # Execute the actions set by the functions | ||||||
|             if [ ! -z "$preflight_actions_string" ]; then |             if [ -n "$preflight_actions_string" ]; then | ||||||
|                 # Try to execute the actions as root |                 # Try to execute the actions as root | ||||||
|                 try_exec "$preflight_actions_string" |                 try_exec "$preflight_actions_string" | ||||||
|                 if [ "$?" -eq 1 ]; then |                 if [ "$?" -eq 1 ]; then | ||||||
| @@ -1029,7 +1029,7 @@ preflight_check() { | |||||||
|         else |         else | ||||||
|             # User declined to automatically fix configuration issues |             # User declined to automatically fix configuration issues | ||||||
|             # Show manual configuration options |             # Show manual configuration options | ||||||
|             if [ ! -z "$preflight_manual_string" ]; then |             if [ -n "$preflight_manual_string" ]; then | ||||||
|                 message info "$preflight_manual_string" |                 message info "$preflight_manual_string" | ||||||
|             fi |             fi | ||||||
|         fi |         fi | ||||||
| @@ -1535,7 +1535,7 @@ download_select_install() { | |||||||
|     esac |     esac | ||||||
|  |  | ||||||
|     # For runners, check GlibC version against runner requirements |     # For runners, check GlibC version against runner requirements | ||||||
|     if [ "$download_type" = "runner" ] && ( [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ] ); then |     if [ "$download_type" = "runner" ] && { [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ]; }; then | ||||||
|         unset glibc_fail |         unset glibc_fail | ||||||
|         required_glibc="2.33" |         required_glibc="2.33" | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user