readwwwlog: fix text/plain check, only sleep for dpaste
This commit is contained in:
parent
7b35fb38c9
commit
80933c33f5
|
@ -43,12 +43,11 @@ for url in ${urls}; do
|
|||
cmd=(${TERMINAL} ${termopts} -e ${cmd})
|
||||
fi
|
||||
|
||||
if [[ ${headers[(I)*text/plain]} -ne 0 ]] || \
|
||||
if [[ ${headers[(I)*text/plain*]} -ne 0 ]] || \
|
||||
[[ ${headers[(I)*HTTP/1.1 405*]} -ne 0 ]]; then # No HEAD allowed
|
||||
sleep 1 # dpaste.com workaround
|
||||
[[ ${url} =~ 'dpaste\.com' ]] && sleep 1
|
||||
curl --silent --location --output ${file} ${url}
|
||||
${cmd} ${file}
|
||||
|
||||
rm ${file}
|
||||
elif [[ ${headers[(I)*application/zip]} -ne 0 ]]; then
|
||||
rm ${file}
|
||||
|
@ -63,7 +62,6 @@ for url in ${urls}; do
|
|||
${cmd} ${txt}
|
||||
fi
|
||||
done
|
||||
|
||||
rm -r ${dir}
|
||||
else
|
||||
${default_cmd} ${url}
|
||||
|
|
Loading…
Reference in New Issue
Block a user