From 6fce61f1ef93ce38c9de30bd126210ec3e1d0874 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 30 Dec 2018 07:01:47 -0200 Subject: Edit newly created pastebin with vi. --- pastebin/website-pastebin | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pastebin') diff --git a/pastebin/website-pastebin b/pastebin/website-pastebin index 0426584..641e75b 100755 --- a/pastebin/website-pastebin +++ b/pastebin/website-pastebin @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i perl -p less perl --pure -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz +#!nix-shell -i perl -p less moreutils nvi perl --pure -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz =head1 NAME @@ -88,8 +88,11 @@ sub envsubst { } my $slug = slugify($title); -$out = "$dirname/../site/pastebin/$slug.org"; +$out = `realpath $dirname/../site/pastebin/$slug.org`; +chomp $out; envsubst(); -print `realpath $out`; +`cat $out | vipe | sponge $out`; + +print "$out\n"; -- cgit v1.2.3