Update default path for installed binaries.

This is useful for installing binaries in a default install
(when JANET_PATH or JANET_MODPATH is not explicitly set).
This commit is contained in:
Calvin Rose 2020-05-09 19:02:12 -05:00
parent 73dba691b1
commit 1168f47768
1 changed files with 6 additions and 1 deletions

7
jpm
View File

@ -34,8 +34,13 @@
(def JANET_LIBPATH (or (os/getenv "JANET_LIBPATH")
(string exe-dir "/../lib")))
# We want setting JANET_PATH to contain installed binaries. However, it is convenient
# to have globally installed binaries got to the same place as jpm itself, which is on
# the $PATH.
(def JANET_BINPATH (or (os/getenv "JANET_BINPATH")
(string (dyn :syspath) "/bin")))
(if-let [mp (os/getenv "JANET_MODPATH")] (string mp "/bin"))
(if-let [mp (os/getenv "JANET_PATH")] (string mp "/bin"))
exe-dir))
#
# Utilities