diff options
Diffstat (limited to 'personality-archiver')
-rwxr-xr-x | personality-archiver | 14 |
1 files changed, 14 insertions, 0 deletions
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 |