From d221ab23bdadbc5eb48d146b33f979dc98fa4575 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 8 Mar 2021 18:57:00 +0100 Subject: [PATCH] Improved ipfs-publish.sh --- Scripts/ipfs-publish.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Scripts/ipfs-publish.sh b/Scripts/ipfs-publish.sh index ba95d572..2385ecce 100755 --- a/Scripts/ipfs-publish.sh +++ b/Scripts/ipfs-publish.sh @@ -1,7 +1,7 @@ #!/bin/sh # Syntax: ./ipfs-publish -# Description: publishes the given directory tree to IPDS +# Description: publishes the given directory tree to IPFS # Author: Markus Fleschutz # Source: github.com/fleschutz/PowerShell # License: CC0 @@ -11,18 +11,15 @@ DIR=$1 IPFS_HASHES="IPFS_hash_list.txt" DF_HASHES="checksum_list.xml" -echo "Publishing directory tree $DIR to IPFS" -echo "(1) Removing Thumbs.db in subfolders ..." +echo "Publishing folder $DIR to IPFS" +echo "(1/3) Removing Thumbs.db in subfolders ..." nice find "$DIR" -name Thumbs.db -exec rm -rf {} \; -echo "(2) Adding $DIR to IPFS ..." +echo "(2/3) Adding $DIR to IPFS ..." nice ipfs add -r "$DIR" > $IPFS_HASHES -echo "(3) Verifying ..." -nice ipfs pin verify - -echo "(4) Calculating digital forensics hashes to $DF_HASHES ..." +echo "(3/3) Calculating digital forensics hashes to $DF_HASHES ..." nice hashdeep -c md5,sha1,sha256 -r -d -l -j 1 "$DIR" > $DF_HASHES -echo "DONE - to publish the content execute: ipfs name publish " +echo "OK - to publish the content execute: ipfs name publish " exit 0