mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-01 14:40:34 +00:00
Compare commits
11 Commits
v1.21
...
1ae94e9b50
Author | SHA1 | Date | |
---|---|---|---|
1ae94e9b50 | |||
747c799a8b | |||
ba907c44bf | |||
e7a3b30564 | |||
38e646578a | |||
d0dc44dcd9 | |||
9986f1fe8c | |||
bc11c184d2 | |||
02a79aa859 | |||
2eabf019a6 | |||
bdb71475a8 |
@ -67,6 +67,9 @@ From Source:
|
|||||||
2. Extract it!
|
2. Extract it!
|
||||||
3. Run it!
|
3. Run it!
|
||||||
|
|
||||||
|
Dependencies: bash, coreurtils, curl, polkit (those should be installed by default on most distributions)
|
||||||
|
Optional Dependencies: zenity (for GUI), zstd (to extract some runners)
|
||||||
|
|
||||||
Arch Linux: https://aur.archlinux.org/packages/lug-helper/
|
Arch Linux: https://aur.archlinux.org/packages/lug-helper/
|
||||||
|
|
||||||
## Contributors:
|
## Contributors:
|
||||||
|
@ -65,6 +65,12 @@ if [ ! -x "$(command -v curl)" ]; then
|
|||||||
notify-send "lug-helper" "The required package 'curl' was not found on this system.\n" --icon=dialog-warning
|
notify-send "lug-helper" "The required package 'curl' was not found on this system.\n" --icon=dialog-warning
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ ! -x "$(command -v zstd)" ]; then
|
||||||
|
# Print to stderr and also try warning the user through notify-send
|
||||||
|
printf "lug-helper.sh: The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" 1>&2
|
||||||
|
notify-send "lug-helper" "The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" --icon=dialog-warning
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v realpath)" ] || [ ! -x "$(command -v dirname)" ]; then
|
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v realpath)" ] || [ ! -x "$(command -v dirname)" ]; then
|
||||||
# Print to stderr and also try warning the user through notify-send
|
# 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 coreutils packages are installed:\n- mktemp\n- sort\n- basename\n- realpath\n- dirname\n" 1>&2
|
printf "lug-helper.sh: One or more required packages were not found on this system.\nPlease check that the following coreutils packages are installed:\n- mktemp\n- sort\n- basename\n- realpath\n- dirname\n" 1>&2
|
||||||
@ -117,7 +123,6 @@ runners_dir="$data_dir/lutris/runners/wine"
|
|||||||
# ie. "RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
|
# ie. "RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
|
||||||
runner_sources=(
|
runner_sources=(
|
||||||
"RawFox" "https://api.github.com/repos/starcitizen-lug/raw-wine/releases"
|
"RawFox" "https://api.github.com/repos/starcitizen-lug/raw-wine/releases"
|
||||||
"Molotov/Snatella" "https://api.github.com/repos/snatella/wine-runner-sc/releases"
|
|
||||||
"/dev/null" "https://api.github.com/repos/gort818/wine-sc-lug/releases"
|
"/dev/null" "https://api.github.com/repos/gort818/wine-sc-lug/releases"
|
||||||
"GloriousEggroll" "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases"
|
"GloriousEggroll" "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases"
|
||||||
"TKG" "https://api.github.com/repos/Frogging-Family/wine-tkg-git/releases"
|
"TKG" "https://api.github.com/repos/Frogging-Family/wine-tkg-git/releases"
|
||||||
@ -1188,7 +1193,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" ]; then
|
if [ "$download_type" = "runner" ] && ( [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ] ); then
|
||||||
required_glibc="2.33"
|
required_glibc="2.33"
|
||||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
||||||
|
|
||||||
@ -1443,7 +1448,11 @@ eac_workaround() {
|
|||||||
|
|
||||||
# Check if EAC workaround is already applied
|
# Check if EAC workaround is already applied
|
||||||
if grep "$eac_hosts" /etc/hosts; then
|
if grep "$eac_hosts" /etc/hosts; then
|
||||||
|
if grep "^$eac_hosts" /etc/hosts; then
|
||||||
message info "The Easy Anti-Cheat workaround has already been applied.\nYou're all set!"
|
message info "The Easy Anti-Cheat workaround has already been applied.\nYou're all set!"
|
||||||
|
else
|
||||||
|
message info "The Easy Anti-Cheat workaround has already been applied, but is commented out.\nNo changes have been made, please edit /etc/hosts manually!"
|
||||||
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1595,7 +1604,7 @@ maintenance_menu() {
|
|||||||
# Get a random Penguin's Star Citizen referral code
|
# Get a random Penguin's Star Citizen referral code
|
||||||
referral_randomizer() {
|
referral_randomizer() {
|
||||||
# Populate the referral codes array
|
# 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" "STAR-TLLJ-SMG4" "STAR-MFT6-Q44H" "STAR-TZX2-TPWF")
|
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" "STAR-MFT6-Q44H" "STAR-TZX2-TPWF" "STAR-WCHN-4ZMX")
|
||||||
# Pick a random array element. Scale a floating point number for
|
# Pick a random array element. Scale a floating point number for
|
||||||
# a more random distribution than simply calling RANDOM
|
# a more random distribution than simply calling RANDOM
|
||||||
random_code="${referral_codes[$(awk '{srand($2); print int(rand()*$1)}' <<< "${#referral_codes[@]} $RANDOM")]}"
|
random_code="${referral_codes[$(awk '{srand($2); print int(rand()*$1)}' <<< "${#referral_codes[@]} $RANDOM")]}"
|
||||||
|
Reference in New Issue
Block a user