From 9872ba3b168a8e1d61152ec6d462024f015f07da Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 11 Sep 2021 11:17:17 +0200 Subject: [PATCH] Update publish-to-ipfs.ps1 --- Scripts/publish-to-ipfs.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Scripts/publish-to-ipfs.ps1 b/Scripts/publish-to-ipfs.ps1 index 70f9993d..d1b6308f 100755 --- a/Scripts/publish-to-ipfs.ps1 +++ b/Scripts/publish-to-ipfs.ps1 @@ -19,22 +19,20 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() "" - "Step 1/3: Searching for IPFS executable..." + "Step 1/3: Searching for IPFS..." & ipfs --version if ($lastExitCode -ne "0") { throw "Can't execute 'ipfs' - make sure IPFS is installed and available" } if (test-path "$Files" -pathType container) { "" "Step 2/3: Publishing folder $Files/ to IPFS..." - [int]$Count = 1 & ipfs add -r "$Files" > $HashList - + [int]$Count = 1 "" echo "Step 3/3: Calculating digital forensics hashes to $DF_HASHES ..." & nice hashdeep -c md5,sha1,sha256 -r -d -l -j 1 "$Files" > $DF_Hashes } else { $FileList = (get-childItem "$Files") - [int]$Count = $FileList.Count foreach ($File in $FileList) { if (test-path "$Files" -pathType container) { "Step 2/3: Publishing folder $File/ to IPFS..." @@ -44,6 +42,7 @@ try { & ipfs add "$File" >> $HashList } } + [int]$Count = $FileList.Count } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds