about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.PL2
-rwxr-xr-xlei.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 8bd39e6c..38e030f5 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -264,7 +264,7 @@ prefix = \$(HOME)
 bindir = \$(prefix)/bin
 symlink-install : lib/PublicInbox.pm
         mkdir -p \$(bindir)
-        lei=\$\$(realpath lei.sh) && cd \$(bindir) && \\
+        lei="\$(PWD)/lei.sh" && cd \$(bindir) && \\
         for x in \$(EXE_FILES); do \\
                 ln -sf "\$\$lei" \$\$(basename "\$\$x"); \\
         done
diff --git a/lei.sh b/lei.sh
index f1510a73..afb03f3e 100755
--- a/lei.sh
+++ b/lei.sh
@@ -1,7 +1,7 @@
 #!/bin/sh -e
 # symlink this file to a directory in PATH to run lei (or anything in script/*)
 # without needing perms to install globally.  Used by "make symlink-install"
-p=$(realpath "$0" || readlink "$0") # neither is POSIX, but common
+p=$(realpath "$0" 2>/dev/null || readlink "$0") # neither is POSIX, but common
 p=$(dirname "$p") c=$(basename "$0") # both are POSIX
 exec ${PERL-perl} -w -I"$p"/lib "$p"/script/"${c%.sh}" "$@"
 : this script is too short to copyright