From e78888c73675614480939fbe7221fb90d03c63be Mon Sep 17 00:00:00 2001 From: pato-pan <131620424+pato-pan@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:03:03 +0000 Subject: [PATCH] Update install.sh Updated for new commits added the -f (force) option. Helps whenever there's corruption or permissions issue. wget will now resume existing downloads. Untested. Questions. If the file is corrupted or different from what's expected, will it overwrite it? If the file already exists and is completed, will it skip it? Untested behavior in the case the file can't be resumed, I don't know if the rm -f is needed now. It might be a good idea to not delete it at all in case the install fails at a later part of the process. The user can resume the install without having to redownload the file if you don't delete it. Files in /tmp/ get removed by themselves after shutting down the device anyways. --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3bdea91..b20134f 100755 --- a/install.sh +++ b/install.sh @@ -103,8 +103,11 @@ install_miniconda() { ;; esac + # Clean existing Miniconda installer script + #rm -f /tmp/miniconda_installer.sh + # Download the Miniconda installer script - wget "https://repo.anaconda.com/miniconda/$miniconda_installer" -O /tmp/miniconda_installer.sh + wget -c "https://repo.anaconda.com/miniconda/$miniconda_installer" -O /tmp/miniconda_installer.sh # Run the installer script bash /tmp/miniconda_installer.sh -b -p "$HOME/miniconda" @@ -116,7 +119,7 @@ install_miniconda() { source "$HOME/miniconda/etc/profile.d/conda.sh" # Clean up the Downloaded file - rm /tmp/miniconda_installer.sh + #rm -f /tmp/miniconda_installer.sh echo "Miniconda installed successfully in $HOME/miniconda" }