Browse Source

sde-nopaste: enhanced to try plain `file` if mime isn't known

user/amery/wip/mount
Alejandro Mery 14 years ago
parent
commit
d61e75cdcc
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      bin/sde-nopaste

+ 6
- 1
bin/sde-nopaste

@ -49,7 +49,12 @@ case "$mime" in
text/x-shellscript) lang=bash ;;
text/x-diff) lang=diff ;;
text/x-c) lang=c ;;
*) lang=text ;;
*)
case "$type" in
"diff output text") lang=diff ;;
*) echo_warning "Assuming plain text (type:$type mime:$mime)"
lang=text ;;
esac
esac
hash=$(curl -si -H 'Expect:' -F "sourcefile=@$file" -F lang=$lang \

Loading…
Cancel
Save