mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-14 12:30:35 +00:00
Compare commits
9 Commits
1a415f9f1b
...
2780788f70
Author | SHA1 | Date | |
---|---|---|---|
|
2780788f70 | ||
|
1561e1a9f6 | ||
|
a0110720f6 | ||
|
c1af0383f2 | ||
|
74c5bd2275 | ||
|
48d49dd438 | ||
|
f080ae2bca | ||
|
72677ff7d5 | ||
|
42f9992abf |
@ -61,10 +61,10 @@ if [ ! -x "$(command -v curl)" ]; then
|
||||
notify-send "lug-helper" "The required package 'curl' was not found on this system.\n" --icon=dialog-warning
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v basename)" ]; then
|
||||
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v sort)" ]; then
|
||||
# Print to stderr and also try warning the user through notify-send
|
||||
printf "lug-helper.sh: One or more required packages were not found on this system.\nPlease check that the following packages are installed:\n- mktemp (part of gnu coreutils)\n- basename (part of gnu coreutils)\n" 1>&2
|
||||
notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that the following packages are installed:\n- mktemp (part of gnu coreutils)\n- basename (part of gnu coreutils)\n" --icon=dialog-warning
|
||||
printf "lug-helper.sh: One or more required packages were not found on this system.\nPlease check that the following packages are installed:\n- mktemp (part of gnu coreutils)\n- basename (part of gnu coreutils)\n- sort (part of gnu coreutils)\n" 1>&2
|
||||
notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that the following packages are installed:\n- mktemp (part of gnu coreutils)\n- basename (part of gnu coreutils)\n- sort (part of gnu coreutils)\n" --icon=dialog-warning
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -145,9 +145,9 @@ else
|
||||
fi
|
||||
|
||||
# Github repo and script version info
|
||||
repo="the-sane/lug-helper"
|
||||
releases_url="https://github.com/the-sane/lug-helper/releases"
|
||||
current_version="v1.11.1"
|
||||
repo="starcitizen-lug/lug-helper"
|
||||
releases_url="https://github.com/$repo/releases"
|
||||
current_version="v1.12"
|
||||
|
||||
############################################################################
|
||||
############################################################################
|
||||
@ -972,10 +972,10 @@ download_install() {
|
||||
num_files=0
|
||||
for extracted_item in "$tmp_dir/$download_name"/*; do
|
||||
if [ -d "$extracted_item" ]; then
|
||||
num_dirs="$((num_dirs+1))"
|
||||
num_dirs="$(($num_dirs+1))"
|
||||
extracted_dir="$(basename "$extracted_item")"
|
||||
elif [ -f "$extracted_item" ]; then
|
||||
num_files="$((num_files+1))"
|
||||
num_files="$(($num_files+1))"
|
||||
fi
|
||||
done
|
||||
|
||||
@ -1410,7 +1410,7 @@ eac_workaround() {
|
||||
|
||||
# Configure message variables
|
||||
eac_title="Easy Anti-Cheat Workaround"
|
||||
eac_hosts_formatted="127.0.0.1 modules-cdn.eac-prod.on.epicgames.com"
|
||||
eac_hosts_formatted="$eac_hosts"
|
||||
eac_dir_formatted="$eac_dir"
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
eac_title="<b>$eac_title</b>"
|
||||
@ -1420,7 +1420,13 @@ eac_workaround() {
|
||||
|
||||
if message question "$eac_title\n\nThe following entry will be added to /etc/hosts:\n$eac_hosts_formatted\n\nThe following directory will be deleted:\n$eac_dir_formatted\n\n\nTo revert these changes, delete the above line from\n/etc/hosts and relaunch the game\n\nDo you want to proceed?"; then
|
||||
debug_print continue "Editing hosts file..."
|
||||
sudo sh -c "echo '127.0.0.1 modules-cdn.eac-prod.on.epicgames.com' >> /etc/hosts"
|
||||
|
||||
# Use pollkit's pkexec for gui with a fallback to sudo
|
||||
if [ -x "$(command -v pkexec)" ]; then
|
||||
pkexec sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
||||
else
|
||||
sudo sh -c "echo $eac_hosts '#Star Citizen EAC workaround' >> /etc/hosts"
|
||||
fi
|
||||
|
||||
debug_print continue "Deleting $eac_dir..."
|
||||
rm -r "$eac_dir"
|
||||
@ -1467,7 +1473,7 @@ maintenance_menu() {
|
||||
# Get a random Penguin's Star Citizen referral code
|
||||
referral_randomizer() {
|
||||
# Populate the referral codes array
|
||||
referral_codes=("STAR-4TZD-6KMM" "STAR-4XM2-VM99" "STAR-2NPY-FCR2" "STAR-T9Z9-7W6P" "STAR-VLBF-W2QR" "STAR-BYR6-YHMF" "STAR-3X2H-VZMX" "STAR-BRWN-FB9T" "STAR-FG6Y-N4Q4" "STAR-VLD6-VZRG" "STAR-T9KF-LV77" "STAR-4XHB-R7RF" "STAR-9NVF-MRN7" "STAR-3Q4W-9TC3" "STAR-3SBK-7QTT" "STAR-XFBT-9TTK" "STAR-F3H9-YPHN" "STAR-BYK6-RCCL" "STAR-XCKH-W6T7" "STAR-H292-39WK" "STAR-ZRT5-PJB7" "STAR-GMBP-SH9Y" "STAR-PLWB-LMFY" "STAR-TNZN-H4ZT" "STAR-T5G5-L2GJ" "STAR-6TPV-7QH2" "STAR-THHD-TV3Y" "STAR-7ZFS-PK2L" "STAR-SRQN-43TB" "STAR-9TDG-D4H9" "STAR-BPH3-THJC" "STAR-HL3M-R5KC" "STAR-GBS5-LTVB" "STAR-CJ3Y-KZZ4" "STAR-5GRM-7HBY" "STAR-G2GX-Y2QJ" "STAR-YWY3-H4XX" "STAR-6VGM-PTKC" "STAR-T6MZ-QFHX" "STAR-T2K6-LXFW" "STAR-XN25-9CJJ" "STAR-47V3-4QGB" "STAR-YD4Z-TQZV" "STAR-XLN7-9XNJ" "STAR-N62T-2R39" "STAR-3S3D-9HXQ" "STAR-TRZF-NMCV")
|
||||
referral_codes=("STAR-4TZD-6KMM" "STAR-4XM2-VM99" "STAR-2NPY-FCR2" "STAR-T9Z9-7W6P" "STAR-VLBF-W2QR" "STAR-BYR6-YHMF" "STAR-3X2H-VZMX" "STAR-BRWN-FB9T" "STAR-FG6Y-N4Q4" "STAR-VLD6-VZRG" "STAR-T9KF-LV77" "STAR-4XHB-R7RF" "STAR-9NVF-MRN7" "STAR-3Q4W-9TC3" "STAR-3SBK-7QTT" "STAR-XFBT-9TTK" "STAR-F3H9-YPHN" "STAR-BYK6-RCCL" "STAR-XCKH-W6T7" "STAR-H292-39WK" "STAR-ZRT5-PJB7" "STAR-GMBP-SH9Y" "STAR-PLWB-LMFY" "STAR-TNZN-H4ZT" "STAR-T5G5-L2GJ" "STAR-6TPV-7QH2" "STAR-THHD-TV3Y" "STAR-7ZFS-PK2L" "STAR-SRQN-43TB" "STAR-9TDG-D4H9" "STAR-BPH3-THJC" "STAR-HL3M-R5KC" "STAR-GBS5-LTVB" "STAR-CJ3Y-KZZ4" "STAR-5GRM-7HBY" "STAR-G2GX-Y2QJ" "STAR-YWY3-H4XX" "STAR-6VGM-PTKC" "STAR-T6MZ-QFHX" "STAR-T2K6-LXFW" "STAR-XN25-9CJJ" "STAR-47V3-4QGB" "STAR-YD4Z-TQZV" "STAR-XLN7-9XNJ" "STAR-N62T-2R39" "STAR-3S3D-9HXQ" "STAR-TRZF-NMCV" "STAR-TLLJ-SMG4")
|
||||
# Pick a random array element. Scale a floating point number for
|
||||
# a more random distribution than simply calling RANDOM
|
||||
random_code="${referral_codes[$(awk '{srand($2); print int(rand()*$1)}' <<< "${#referral_codes[@]} $RANDOM")]}"
|
||||
@ -1533,7 +1539,8 @@ live_or_ptu="$live_dir"
|
||||
# Check if a newer verison of the script is available
|
||||
latest_version="$(get_latest_release "$repo")"
|
||||
|
||||
if [ "$latest_version" != "$current_version" ]; then
|
||||
if [ "$latest_version" != "$current_version" ] &&
|
||||
[ "$current_version" = "$(printf "$current_version\n$latest_version" | sort -V | head -n1)" ]; then
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
releases_url_formatted="<a href='$releases_url'>$releases_url</a>"
|
||||
else
|
||||
@ -1554,6 +1561,7 @@ if [ "$#" -gt 0 ]; then
|
||||
Usage: lug-helper <options>
|
||||
-p, --preflight-check Run system optimization checks
|
||||
-m, --manage-runners Install or remove Lutris runners
|
||||
-k, --manage-dxvk Install or remove DXVK versions
|
||||
-u, --delete-user-folder Delete Star Citizen USER folder, preserving keybinds
|
||||
-s, --delete-shaders Delete Star Citizen shaders directory
|
||||
-c, --delete-dxvk-cache Delete Star Citizen dxvk cache file
|
||||
@ -1571,6 +1579,9 @@ Usage: lug-helper <options>
|
||||
--manage-runners | -m )
|
||||
cargs+=("runner_manage")
|
||||
;;
|
||||
--manage-dxvk | -k )
|
||||
cargs+=("dxvk_manage")
|
||||
;;
|
||||
--delete-user-folder | -u )
|
||||
cargs+=("sanitize")
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user