mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Fix network checks.
This commit is contained in:
parent
9809d2324a
commit
0d078cb88a
|
@ -710,7 +710,7 @@ done < $1
|
|||
|
||||
check_network_connectivity() {
|
||||
# This function will do a basic check for network availability and return "true" if it is working.
|
||||
# USAGE: if [[ check_network_connectivity == "true" ]]; then
|
||||
# USAGE: if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
|
||||
wget -q --spider $rd_repo
|
||||
|
||||
|
@ -1550,7 +1550,7 @@ cli_emulator_reset() {
|
|||
case $1 in
|
||||
|
||||
"retroarch" )
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
ra_init
|
||||
else
|
||||
printf "You do not appear to be connected to a network with internet access.\n\nThe RetroArch reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n"
|
||||
|
@ -1584,7 +1584,7 @@ cli_emulator_reset() {
|
|||
rpcs3_init
|
||||
;;
|
||||
"xemu" )
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
xemu_init
|
||||
else
|
||||
printf "You do not appear to be connected to a network with internet access.\n\nThe Xemu reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n"
|
||||
|
@ -1594,7 +1594,7 @@ cli_emulator_reset() {
|
|||
yuzu_init
|
||||
;;
|
||||
"all-emulators" )
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
ra_init
|
||||
standalones_init
|
||||
else
|
||||
|
|
|
@ -135,7 +135,7 @@ then
|
|||
# if the lock file doesn't exist at all means that it's a fresh install or a triggered reset
|
||||
else
|
||||
echo "Lockfile not found"
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
finit # Executing First/Force init
|
||||
else
|
||||
configurator_generic_dialog "You do not appear to be connected to a network with internet access.\n\nThe initial RetroDECK setup requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available."
|
||||
|
@ -152,7 +152,7 @@ fi
|
|||
desktop_mode_warning
|
||||
|
||||
# Check if there is a new version of RetroDECK available, if update_check=true in retrodeck.cfg and there is network connectivity available.
|
||||
if [[ check_network_connectivity == "true" ]] && [[ $update_check == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]] && [[ $update_check == "true" ]]; then
|
||||
check_for_version_update
|
||||
fi
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ configurator_reset_dialog() {
|
|||
|
||||
"RetroArch" )
|
||||
if [[ $(configurator_reset_confirmation_dialog "RetroArch" "Are you sure you want to reset the RetroArch emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
ra_init
|
||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||
else
|
||||
|
@ -193,7 +193,7 @@ configurator_reset_dialog() {
|
|||
|
||||
"XEMU" )
|
||||
if [[ $(configurator_reset_confirmation_dialog "XEMU" "Are you sure you want to reset the XEMU emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
xemu_init
|
||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||
else
|
||||
|
@ -225,7 +225,7 @@ configurator_reset_dialog() {
|
|||
|
||||
"Reset All Emulators" )
|
||||
if [[ $(configurator_reset_confirmation_dialog "all emulators" "Are you sure you want to reset all emulators to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||
if [[ check_network_connectivity == "true" ]]; then
|
||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||
ra_init
|
||||
standalones_init
|
||||
configurator_process_complete_dialog "resetting all emulators"
|
||||
|
|
Loading…
Reference in a new issue