bzzup shell script updated for compatibility with new resolver.

This commit is contained in:
Daniel A. Nagy 2015-06-02 12:22:50 +02:00
parent b2330c4e2e
commit e9ad659eb1

View file

@ -6,7 +6,7 @@ delimiter='{"entries":[{'
if [ -f "$1" ]; then
hash=`wget -q -O- --post-file="$1" http://localhost:8500/raw`
mime=`file --mime-type -b "$1"`
mime=`mimetype -b "$1"`
wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" http://localhost:8500/raw
echo
@ -21,7 +21,7 @@ pushd "$bzzroot" > /dev/null
(for path in `find . -type f`
do
name=`echo "$path" | cut -c2-`
name=`echo "$path" | cut -c3-`
[ _`basename "$name"` = "_$INDEX" ] && name=`dirname "$name"`
echo -n "$delimiter"
hash=`wget -q -O- --post-file="$path" http://localhost:8500/raw`