summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-04-13 22:01:13 +0200
committertv <tv@krebsco.de>2019-04-13 22:01:13 +0200
commit3214a47d45d1ba52797b6ffdac7bfbafba347480 (patch)
tree8458f051660d84148d091557b3587e27e06057ce
parenta224e77dfbb8dc88119891c492651458cfacd39a (diff)
krebspaste: print public URL
-rw-r--r--krebs/5pkgs/simple/krebspaste/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/krebs/5pkgs/simple/krebspaste/default.nix b/krebs/5pkgs/simple/krebspaste/default.nix
index a11c8c90a..d97b6a053 100644
--- a/krebs/5pkgs/simple/krebspaste/default.nix
+++ b/krebs/5pkgs/simple/krebspaste/default.nix
@@ -1,6 +1,12 @@
-{ writeDashBin, bepasty-client-cli }:
+{ bepasty-client-cli, gnused, writeDashBin }:
-# TODO use `pkgs.exec` instead?
writeDashBin "krebspaste" ''
- exec ${bepasty-client-cli}/bin/bepasty-cli -L 1m --url http://paste.r "$@" | sed '$ s/$/\/+inline/g'
+ ${bepasty-client-cli}/bin/bepasty-cli -L 1m --url http://paste.r "$@" |
+ ${gnused}/bin/sed '
+ $ {
+ s/$/\/+inline/
+ p
+ s/\<r\>/krebsco.de/
+ }
+ '
''