1
0
mirror of https://github.com/janet-lang/janet synced 2024-10-18 16:05:47 +00:00

Merge pull request #1485 from sogaiu/tweak-add-bin-dest-arg

Prefix bin+sep to add-bin dest argument
This commit is contained in:
Calvin Rose 2024-08-15 05:47:10 -07:00 committed by GitHub
commit 2dcc0adc0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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"