pkgs.kpaste: paste either stdin or file from parameter

This commit is contained in:
makefu 2020-06-05 10:31:17 +02:00
parent fa5f65ee76
commit bed170dd8a
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -1,6 +1,6 @@
{ curl, gnused, writeDashBin }:
writeDashBin "kpaste" ''
${curl}/bin/curl -sS http://p.r --data-binary @- |
${gnused}/bin/sed '$ {p;s/\<r\>/krebsco.de/}'
${curl}/bin/curl -sS http://p.r --data-binary @"''${1:--}" |
${gnused}/bin/sed '$ {p;s/\<http://p.r\>/krebsco.de/}'
''