Compare commits

...

2 Commits

Author SHA1 Message Date
the Sane
274c674681
Improve archive subdirectory handling 2021-10-24 12:29:55 -04:00
the Sane
cf491f9151
Add dxvk releases from /dev/null 2021-10-24 12:01:38 -04:00

View File

@ -124,6 +124,7 @@ dxvk_dir="$data_dir/lutris/runtime/dxvk"
# ie. "Sporif Async" "https://api.github.com/repos/Sporif/dxvk-async/releases"
dxvk_sources=(
"Sporif Async" "https://api.github.com/repos/Sporif/dxvk-async/releases"
"/dev/null" "https://api.github.com/repos/gort818/dxvk/releases"
)
# Set a maximum number of runner versions to display from each url
max_dxvks=20
@ -947,7 +948,8 @@ runner_install() {
# Extract the runner
case "$first_filepath" in
# If the files in the archive begin with ./ there is no subdirectory
# If the files in the archive begin with ./ there is no subdirectory,
# so we must create one
./*)
debug_print continue "Installing runner into $runners_dir/$runner_name..."
if [ "$use_zenity" -eq 1 ]; then
@ -959,9 +961,10 @@ runner_install() {
fi
lutris_needs_restart="true"
;;
*)
# Runners with a subdirectory in the archive
debug_print continue "Installing runner into $runners_dir..."
# If a subdirectory exists and has the same name as the archive,
# extract it as is
"$runner_name")
debug_print continue "Installing runner into $runners_dir/$runner_name....."
if [ "$use_zenity" -eq 1 ]; then
# Use Zenity progress bar
mkdir -p "$runners_dir" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir" | \
@ -971,6 +974,19 @@ runner_install() {
fi
lutris_needs_restart="true"
;;
# If a subdirectory exists and has any other name,
# we must create the correct subdirectory
*)
debug_print continue "Installing runner into $runners_dir/$runner_name..."
if [ "$use_zenity" -eq 1 ]; then
# Use Zenity progress bar
mkdir -p "$runners_dir/$runner_name" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir/$runner_name" | \
zenity --progress --pulsate --no-cancel --auto-close --title="Star Citizen LUG Helper" --text="Installing runner...\n" 2>/dev/null
else
mkdir -p "$runners_dir/$runner_name" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir/$runner_name"
fi
lutris_needs_restart="true"
;;
esac
# Cleanup tmp download
@ -1282,7 +1298,8 @@ dxvk_install() {
# Extract the dxvk
case "$first_filepath" in
# If the files in the archive begin with ./ there is no subdirectory
# If the files in the archive begin with ./ there is no subdirectory,
# so we must create one
./*)
debug_print continue "Installing DXVK into $dxvk_dir/$dxvk_name..."
if [ "$use_zenity" -eq 1 ]; then
@ -1294,9 +1311,10 @@ dxvk_install() {
fi
lutris_needs_restart="true"
;;
*)
# dxvks with a subdirectory in the archive
debug_print continue "Installing DXVK into $dxvk_dir..."
# If a subdirectory exists and has the same name as the archive,
# extract it as is
"$dxvk_name")
debug_print continue "Installing DXVK into $dxvk_dir/$dxvk_name..."
if [ "$use_zenity" -eq 1 ]; then
# Use Zenity progress bar
mkdir -p "$dxvk_dir" && tar -xf "$tmp_dir/$dxvk_file" -C "$dxvk_dir" | \
@ -1306,6 +1324,19 @@ dxvk_install() {
fi
lutris_needs_restart="true"
;;
# If a subdirectory exists and has any other name,
# we must create the correct subdirectory
*)
debug_print continue "Installing DXVK into $dxvk_dir/$dxvk_name..."
if [ "$use_zenity" -eq 1 ]; then
# Use Zenity progress bar
mkdir -p "$dxvk_dir/$dxvk_name" && tar -xf "$tmp_dir/$dxvk_file" -C "$dxvk_dir/$dxvk_name" | \
zenity --progress --pulsate --no-cancel --auto-close --title="Star Citizen LUG Helper" --text="Installing DXVK...\n" 2>/dev/null
else
mkdir -p "$dxvk_dir/$dxvk_name" && tar -xf "$tmp_dir/$dxvk_file" -C "$dxvk_dir/$dxvk_name"
fi
lutris_needs_restart="true"
;;
esac
# Cleanup tmp download