diff options
author | Eric Wong <e@80x24.org> | 2023-10-04 17:46:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-04 22:58:22 +0000 |
commit | 14dd9df0f718f8d0815851efe52f3633ec6137b8 (patch) | |
tree | 9745ef7745c05a0888e466c656db9037b8ab27c4 /lei.sh | |
parent | 8fe9ff206dfc868882d8382f9b718868e2660330 (diff) | |
download | public-inbox-14dd9df0f718f8d0815851efe52f3633ec6137b8.tar.gz |
For the Makefile, we can use $(PWD) make macro from make(1posix) as POSIX requires all environment variables be accessible as macros, and $PWD is a standard sh(1) environment variable. lei.sh must quiet the stderr of realpath before falling back to readlink(1) which is available on NetBSD.
Diffstat (limited to 'lei.sh')
-rwxr-xr-x | lei.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |