diff options
author | msglm <msglm@techchud.xyz> | 2023-07-15 03:40:17 -0500 |
---|---|---|
committer | msglm <msglm@techchud.xyz> | 2023-07-15 03:40:17 -0500 |
commit | 80379b4572ce31d2841c3b7c9f0920d1ba77901a (patch) | |
tree | 76e97be629d3c6382c461d79ec188f6f64da5be5 | |
parent | 7dfe16e0a8f518c3f93e7523661fd95e1d21fc91 (diff) | |
download | stashley-80379b4572ce31d2841c3b7c9f0920d1ba77901a.tar.gz stashley-80379b4572ce31d2841c3b7c9f0920d1ba77901a.tar.bz2 stashley-80379b4572ce31d2841c3b7c9f0920d1ba77901a.zip |
add IPFS support
-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 |