1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-12 09:40:26 +00:00

Prefix bin+sep to add-bin dest argument

This commit is contained in:
sogaiu 2024-08-15 15:53:35 +09:00
parent 6bd58dd4c0
commit 8ca1e44af1

View File

@ -4387,10 +4387,10 @@
`Shorthand for adding scripts during an install. Scripts will be installed to `Shorthand for adding scripts during an install. Scripts will be installed to
(string (dyn *syspath*) "/bin") by default and will be set to be executable.` (string (dyn *syspath*) "/bin") by default and will be set to be executable.`
[manifest src &opt dest chmod-mode] [manifest src &opt dest chmod-mode]
(default dest (string "bin" (sep) (->> src (string/split "/") last))) (default dest (last (string/split "/" src)))
(default chmod-mode 8r755) (default chmod-mode 8r755)
(os/mkdir (string (dyn *syspath*) (sep) "bin")) (os/mkdir (string (dyn *syspath*) (sep) "bin"))
(bundle/add-file manifest src dest chmod-mode)) (bundle/add-file manifest src (string "bin" (sep) dest) chmod-mode))
(defn bundle/update-all (defn bundle/update-all
"Reinstall all bundles" "Reinstall all bundles"