about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-18 05:21:27 +0000
committerEric Wong <e@80x24.org>2020-12-19 09:32:08 +0000
commit223d66dfcf9d0915709e23a561322e8bb4a7fac6 (patch)
treefc7a54247afe9eef04c2afb8f50bd90c500df1a0 /Makefile.PL
parent2fe6af26d737773e0a7cafa5902360ab1309c807 (diff)
downloadpublic-inbox-223d66dfcf9d0915709e23a561322e8bb4a7fac6.tar.gz
This could've been done ages ago, but I rarely invoked
public-inbox-* commands from an interactive terminal
like I would with lei.
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 57592378..924e8dfd 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -223,5 +223,16 @@ Makefile.PL : MANIFEST
         touch -r MANIFEST \$@
         \$(PERLRUN) \$@
 
+# Install symlinks to ~/bin (which is hopefuly in PATH) which point to
+# this source tree.
+# prefix + bindir matches git.git Makefile:
+prefix = \$(HOME)
+bindir = \$(prefix)/bin
+symlink-install :
+        mkdir -p \$(bindir)
+        lei=\$\$(realpath lei.sh) && cd \$(bindir) && \\
+        for x in \$(EXE_FILES); do \\
+                ln -sf "\$\$lei" \$\$(basename "\$\$x"); \\
+        done
 EOF
 }