Compare commits

..

No commits in common. "85932824ca68c9ae37fff91d8b33c760a7247cbe" and "0d2845b61473131f838e811c3cdb4eb783b5d432" have entirely different histories.

View File

@ -152,8 +152,8 @@ shaders_subdir="shaders"
# Use logo installed by a packaged version of this script if available
# Otherwise, default to the logo in the same directory
if [ -f "$(dirname "$helper_dir")/share/pixmaps/lug-logo.png" ]; then
lug_logo="$(dirname "$helper_dir")/share/pixmaps/lug-logo.png"
if [ -f "/usr/share/pixmaps/lug-logo.png" ]; then
lug_logo="/usr/share/pixmaps/lug-logo.png"
elif [ -f "$helper_dir/lug-logo.png" ]; then
lug_logo="$helper_dir/lug-logo.png"
else
@ -162,8 +162,8 @@ fi
# Use Lutris install script installed by a packaged version of this script if available
# Otherwise, default to the json in the same directory
if [ -f "$(dirname "$helper_dir")/share/lug-helper/lutris-sc-install.json" ]; then
install_script="$(dirname "$helper_dir")/share/lug-helper/lutris-sc-install.json"
if [ -f "/usr/share/lug-helper/lutris-sc-install.json" ]; then
install_script="/usr/share/lug-helper/lutris-sc-install.json"
else
install_script="$helper_dir/lutris-sc-install.json"
fi
@ -2331,15 +2331,6 @@ eac_workaround() {
fi
}
# Format some URLs for Zenity
format_urls() {
if [ "$use_zenity" -eq 1 ]; then
releases_url="<a href='$releases_url'>$releases_url</a>"
lug_wiki="<a href='$lug_wiki'>$lug_wiki</a>"
lug_wiki_nixos="<a href='$lug_wiki_nixos'>$lug_wiki_nixos</a>"
fi
}
# Get a random Penguin's Star Citizen referral code
referral_randomizer() {
# Populate the referral codes array
@ -2387,9 +2378,11 @@ fi
# Set defaults
live_or_ptu="$live_dir"
# Format some URLs for Zenity if the Helper was not invoked with command-line arguments (handle those separately below)
if [ "$#" -eq 0 ]; then
format_urls
# Format some URLs for Zenity
if [ "$use_zenity" -eq 1 ]; then
releases_url="<a href='$releases_url'>$releases_url</a>"
lug_wiki="<a href='$lug_wiki'>$lug_wiki</a>"
lug_wiki_nixos="<a href='$lug_wiki_nixos'>$lug_wiki_nixos</a>"
fi
# Check if a newer verison of the script is available
@ -2420,7 +2413,7 @@ Usage: lug-helper <options>
-s, --delete-shaders Delete Star Citizen shaders
-c, --delete-dxvk-cache Delete Star Citizen dxvk cache file
-t, --target=[live|ptu] Target LIVE or PTU (default live)
-g, --no-gui Use terminal menus instead of a Zenity GUI
-g, --use-gui=[yes|no] Use Zenity GUI if available (default yes)
-r, --get-referral Get a random LUG member's Star Citizen referral code
-d, --show-directories Show all Star Citizen and LUG Helper directories
-w, --show-wiki Show the LUG Wiki
@ -2464,10 +2457,20 @@ Usage: lug-helper <options>
exit 0
fi
;;
--no-gui | -g )
--use-gui=* | -g=* )
# If zenity is unavailable, it has already been set to 0
# and this setting has no effect
use_zenity=0
if [ -x "$(command -v zenity)" ]; then
use_zenity="$(echo "$1" | cut -d'=' -f2)"
if [ "$use_zenity" = "yes" ] || [ "$use_zenity" = "YES" ] || [ "$use_zenity" = "1" ]; then
use_zenity=1
elif [ "$use_zenity" = "no" ] || [ "$use_zenity" = "NO" ] || [ "$use_zenity" = "0" ]; then
use_zenity=0
else
printf "$0: Invalid option '%s'\n" "$1"
exit 0
fi
fi
;;
--get-referral | -r )
cargs+=("referral_randomizer")
@ -2494,9 +2497,6 @@ Usage: lug-helper <options>
shift
done
# Format some URLs for Zenity
format_urls
# Call the requested functions and exit
if [ "${#cargs[@]}" -gt 0 ]; then
for (( x=0; x<"${#cargs[@]}"; x++ )); do