From 3da215b84163d785074ce1d459e09b3e1de7a659 Mon Sep 17 00:00:00 2001 From: Christophe Pinte Date: Fri, 8 Dec 2023 18:05:57 +1100 Subject: [PATCH] Bug fix: filename in downloaded binary --- src/utils.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.f90 b/src/utils.f90 index d36cd169a..2e44f3a51 100644 --- a/src/utils.f90 +++ b/src/utils.f90 @@ -935,7 +935,7 @@ function mcfost_update(lforce_update, lmanual, n_days) else write(*,*) "Done" write(*,'(a25, $)') "Decompressing binary ..." - cmd = "tar xzf mcfost_bin.tgz ; rm -rf mcfost_bin.tgz" + cmd = "mkdir -p mcfost_update ; tar xzf mcfost_bin.tgz -C mcfost_update ; rm -rf mcfost_bin.tgz" call appel_syst(cmd, syst_status) write(*,*) "Done" endif @@ -963,9 +963,9 @@ function mcfost_update(lforce_update, lmanual, n_days) endif endif - ! make binary executable + ! make binary executable and update it write(*,'(a20, $)') "Updating binary ..." - cmd = "chmod a+x mcfost_update ; mv mcfost_update "//trim(current_binary) + cmd = "chmod a+x mcfost_update/mcfost ; mv mcfost_update/mcfost "//trim(current_binary)//" ; rm -rf mcfost_update" call appel_syst(cmd, syst_status) if (syst_status /= 0) then write(*,*) "ERROR : the update failed for some unknown reason"