From 80379b4572ce31d2841c3b7c9f0920d1ba77901a Mon Sep 17 00:00:00 2001 From: msglm Date: Sat, 15 Jul 2023 03:40:17 -0500 Subject: add IPFS support --- personality-archiver | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/personality-archiver b/personality-archiver index b08a0bb..9afce6d 100755 --- a/personality-archiver +++ b/personality-archiver @@ -23,3 +23,17 @@ done done fdupes -dIr . + +if [[ ipfs --help == 0 ]] +then + ## Add new content to personality-archive + personalityName=$(tomlq -r '.name' $1) + ipfs files mkdir /personality-archive + personalityHash=$(ipfs add -Q -r .) + ipfs files rm -r /personality-archive/$personalityName + ipfs files cp /ipfs/$personalityHash /personality-archive/$personalityName + + ## Update IPNS with new personality-archive + personalityArchiveLocationHash=$(ipfs files stat --hash /personality-archive) + ipfs name publish $personalityArchiveLocationHash +fi -- cgit v1.2.3