This commit is contained in:
U-Zyn Chua 2016-06-08 11:32:15 +00:00
commit 13f9eff1d8

View file

@ -11,7 +11,7 @@ fi
if [ -f "$1" ]; then if [ -f "$1" ]; then
hash=`wget -q -O- --post-file="$1" $proxy/bzzr:/` hash=`wget -q -O- --post-file="$1" $proxy/bzzr:/`
mime=`mimetype -b "$1"` mime=`file --mime-type -b "$1"`
# echo wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" $proxy/bzzr:/ # echo wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" $proxy/bzzr:/
wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" $proxy/bzzr:/ wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" $proxy/bzzr:/
echo echo
@ -31,7 +31,7 @@ name=`echo "$path" | cut -c3-`
[ _`basename "$name"` = "_$INDEX" ] && name=`dirname "$name"` [ _`basename "$name"` = "_$INDEX" ] && name=`dirname "$name"`
echo -n "$delimiter" echo -n "$delimiter"
hash=`wget -q -O- --post-file="$path" $proxy/bzzr:/` hash=`wget -q -O- --post-file="$path" $proxy/bzzr:/`
mime=`mimetype -b "$path"` mime=`file --mime-type -b "$1"`
if [ "$mime" = "text/plain" ]; then if [ "$mime" = "text/plain" ]; then
echo -n $path|grep -q '.css' && mime="text/css" echo -n $path|grep -q '.css' && mime="text/css"
fi fi