mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-10-11 07:02:20 +00:00
Move rsi installer download into separate function
This commit is contained in:
@@ -2581,20 +2581,10 @@ install_game() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fetch the latest RSI installer url
|
download_rsi_installer
|
||||||
set_latest_rsi_installer
|
# Abort if the download failed
|
||||||
# Sanity check
|
|
||||||
if [ "$?" -eq 1 ]; then
|
if [ "$?" -eq 1 ]; then
|
||||||
message error "Could not fetch the latest RSI installer! The latest.yml format may have changed or the site is down."
|
message error "Unable to install Star Citizen. Aborting."
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download RSI installer to tmp
|
|
||||||
download_file "$rsi_installer_url" "$rsi_installer" "installer"
|
|
||||||
# Sanity check
|
|
||||||
if [ ! -f "$tmp_dir/$rsi_installer" ]; then
|
|
||||||
# Something went wrong with the download and the file doesn't exist
|
|
||||||
message error "Something went wrong; the installer could not be downloaded!"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2805,6 +2795,27 @@ download_winetricks() {
|
|||||||
chmod +x "$winetricks_bin"
|
chmod +x "$winetricks_bin"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# MARK: download_rsi_installer()
|
||||||
|
# Downloads the latest RSI setup installer to a temporary file
|
||||||
|
download_rsi_installer() {
|
||||||
|
# Fetch the latest RSI installer url
|
||||||
|
set_latest_rsi_installer
|
||||||
|
# Sanity check
|
||||||
|
if [ "$?" -eq 1 ]; then
|
||||||
|
message error "Could not fetch the latest RSI installer! The latest.yml format may have changed or the site is down."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Download RSI installer to tmp
|
||||||
|
download_file "$rsi_installer_url" "$rsi_installer" "installer"
|
||||||
|
# Sanity check
|
||||||
|
if [ ! -f "$tmp_dir/$rsi_installer" ]; then
|
||||||
|
# Something went wrong with the download and the file doesn't exist
|
||||||
|
message error "Something went wrong; the installer could not be downloaded!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# MARK: get_current_runner()
|
# MARK: get_current_runner()
|
||||||
# Get the wine runner path from the sc-launch.sh script
|
# Get the wine runner path from the sc-launch.sh script
|
||||||
# It's expected that getdirs has already been called by the calling function to populate directory variables
|
# It's expected that getdirs has already been called by the calling function to populate directory variables
|
||||||
|
Reference in New Issue
Block a user