9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Kurt H Maier <khm@sciops.net>
To: 9front@9front.org
Subject: Re: [9front] webpaste: fail if file unreadable
Date: Fri, 9 Jun 2017 09:30:53 -0700	[thread overview]
Message-ID: <20170609163053.GB81475@wopr> (raw)
In-Reply-To: <b79a0306d6095efbaca5d22f25e92f5c@firemail.cc>

On Fri, Jun 09, 2017 at 02:59:14PM +0000, raiz@firemail.cc wrote:
> diff -r 7afc70a22b58 rc/bin/webpaste
> --- a/rc/bin/webpaste	Thu Jun 08 09:08:59 2017 +0200
> +++ b/rc/bin/webpaste	Fri Jun 09 17:57:11 2017 +0300
> @@ -3,6 +3,8 @@
>   	file=/fd/0
>   if not
>   	file=$1
> +test -r $file || echo unreadable file && exit unreadable
> +
>   hpost -u http://okturing.com -p / a_body@$file submit:submit fake:fake 
> a_func:add_post url: |
>   grep -e '\/body\"' |
>   sed 1q | sed 's/^.*href=\"//g; s/body\".*$/body/g'


Shouldn't this test be in hpost?

khm


  reply	other threads:[~2017-06-09 16:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 14:59 raiz
2017-06-09 16:30 ` Kurt H Maier [this message]
2017-06-09 23:40   ` raiz
2017-06-10  7:42     ` Kurt H Maier
2017-06-10 15:09       ` raiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170609163053.GB81475@wopr \
    --to=khm@sciops.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).