aboutsummaryrefslogtreecommitdiff
path: root/pastebin
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-12-30 07:01:47 -0200
committerEuAndreh <eu@euandre.org>2018-12-30 07:01:47 -0200
commit6fce61f1ef93ce38c9de30bd126210ec3e1d0874 (patch)
treef773a7593087377d5c93343b2f8127f3fded9b31 /pastebin
parentAllow website subcommands to be run on any folder. (diff)
downloadeuandre.org-6fce61f1ef93ce38c9de30bd126210ec3e1d0874.tar.gz
euandre.org-6fce61f1ef93ce38c9de30bd126210ec3e1d0874.tar.xz
Edit newly created pastebin with vi.
Diffstat (limited to '')
-rwxr-xr-xpastebin/website-pastebin9
1 files changed, 6 insertions, 3 deletions
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";