summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]ipfs-archive-manager5
1 files changed, 2 insertions, 3 deletions
diff --git a/ipfs-archive-manager b/ipfs-archive-manager
index 5571fbb..1b6778b 100644..100755
--- a/ipfs-archive-manager
+++ b/ipfs-archive-manager
@@ -6,14 +6,13 @@
organizationalDirectory=$1
#The name of the subfolder under the organizationalDirectory to put content into
#If the input is `./$NAME`, where $NAME is the individual file name, there will be no subfolder
-#
nameOfContent=$2
#The acutal content itself, could be a file or a folder
content=$3
-ipfs files mkdir /"$organizationalDirectory"
+ipfs files mkdir /"$organizationalDirectory" 2>/dev/null
contentHash=$(ipfs add --nocopy -Q -r "$content")
-ipfs files rm -r /"$organizationalDirectory"/"$nameOfContent"
+ipfs files rm -r /"$organizationalDirectory"/"$nameOfContent" 2>/dev/null
ipfs files cp /ipfs/"$contentHash" /"$organizationalDirectory"/"$nameOfContent"
## Update IPNS with new "$organizationalDirectory"