1
0
mirror of https://github.com/fleschutz/PowerShell.git synced 2025-08-01 02:00:35 +02:00
Files
Scripts
SHA256.ps1
calibre_server
crash_dumps.ps1
domain_table.csv
hashdir
init_git.ps1
ipfs_publish
ipfs_server
password.ps1
passwords.ps1
poweroff.ps1
reboot.ps1
speak.ps1
status
test.ps1
train_dns_cache.ps1
translate.ps1
txt2wav.ps1
wakeup.ps1
LICENSE
README.md
PowerShell/Scripts/ipfs_publish
Markus Fleschutz 4c7e739f8a Added ipfs_publish
2020-05-31 09:27:37 +00:00

24 lines
583 B
Bash
Executable File

#!/bin/sh
#
# Usage: ipfs_publish <directory>
# NOTE: requires <ipfs> and <hashdeep>!
DIR=$1
IPFS_HASHES="IPFS-Hashes.txt"
DF_HASHES="DF.xml"
echo "(1) Removing Thumbs.db ..."
nice find "$DIR" -name Thumbs.db -exec rm -rf {} \;
echo "(2) 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 ..."
nice hashdeep -c md5,sha1,sha256,tiger,whirlpool -r -d -l -j 1 "$DIR" > $DF_HASHES
echo "DONE - to publish the content, execute: ipfs name publish <HASH>"
exit 0