mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-01 13:50:35 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
675621c4c3 | |||
c07e673c0d | |||
b85df29d6d | |||
7f3d84a8bc | |||
6533cf98bd | |||
c7c8cd1ecd |
@ -665,7 +665,7 @@ filelimit_check() {
|
|||||||
|
|
||||||
# Check total system memory
|
# Check total system memory
|
||||||
memory_check() {
|
memory_check() {
|
||||||
memtotal="$(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
|
||||||
@ -824,6 +824,9 @@ runner_install() {
|
|||||||
*.tar.xz)
|
*.tar.xz)
|
||||||
runner_name="$(basename "$runner_file" .tar.xz)"
|
runner_name="$(basename "$runner_file" .tar.xz)"
|
||||||
;;
|
;;
|
||||||
|
*.sha512sum)
|
||||||
|
runner_name="$(basename "$runner_file" .tar.xz)"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
debug_print exit "Unknown archive filetype in runner_install function. Aborting."
|
debug_print exit "Unknown archive filetype in runner_install function. Aborting."
|
||||||
;;
|
;;
|
||||||
@ -834,6 +837,7 @@ runner_install() {
|
|||||||
# runner_select_install function below
|
# runner_select_install function below
|
||||||
if [ "$runner_url_type" = "github" ]; then
|
if [ "$runner_url_type" = "github" ]; then
|
||||||
runner_dl_url="$(curl -s "$contributor_url" | grep "browser_download_url.*$runner_file" | cut -d \" -f4)"
|
runner_dl_url="$(curl -s "$contributor_url" | grep "browser_download_url.*$runner_file" | cut -d \" -f4)"
|
||||||
|
debug_print continue "runner_dl_url= $runner_dl_url"
|
||||||
else
|
else
|
||||||
debug_print exit "Script error: Unknown api/url format in runner_sources array. Aborting."
|
debug_print exit "Script error: Unknown api/url format in runner_sources array. Aborting."
|
||||||
fi
|
fi
|
||||||
@ -986,14 +990,16 @@ runner_select_install() {
|
|||||||
;;
|
;;
|
||||||
*.tar.xz)
|
*.tar.xz)
|
||||||
runner_name="$(basename "${runner_versions[i]}" .tar.xz)"
|
runner_name="$(basename "${runner_versions[i]}" .tar.xz)"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
debug_print exit "Unknown archive filetype in runner_select_install function. Aborting."
|
runner_name="skip"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Add the runner names to the menu
|
# Add the runner names to the menu
|
||||||
if [ -d "$runners_dir/$runner_name" ]; then
|
if [ "$runner_name" = "skip" ]; then
|
||||||
|
continue
|
||||||
|
elif [ -d "$runners_dir/$runner_name" ]; then
|
||||||
menu_options+=("$runner_name [installed]")
|
menu_options+=("$runner_name [installed]")
|
||||||
else
|
else
|
||||||
menu_options+=("$runner_name")
|
menu_options+=("$runner_name")
|
||||||
@ -1264,7 +1270,7 @@ get_latest_release() {
|
|||||||
|
|
||||||
# Check if a new Verison of the script is available
|
# Check if a new Verison of the script is available
|
||||||
repo="the-sane/lug-helper"
|
repo="the-sane/lug-helper"
|
||||||
current_version="v1.9"
|
current_version="v1.9.1"
|
||||||
latest_version=$(get_latest_release "$repo")
|
latest_version=$(get_latest_release "$repo")
|
||||||
|
|
||||||
if [ "$latest_version" != "$current_version" ]; then
|
if [ "$latest_version" != "$current_version" ]; then
|
||||||
|
Reference in New Issue
Block a user