From 182170b3be37a2c7d4e4f334fb5e0385acffb00b Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 16 Mar 2025 20:28:56 -0500 Subject: [PATCH] Make installed manifests nicer to work with. --- src/boot/boot.janet | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 13ffd675..84b52cc3 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -4118,7 +4118,11 @@ [manifest] (def bn (get manifest :name)) (def manifest-name (get-manifest-filename bn)) - (spit manifest-name (string/format "%j\n" manifest))) + (def b @"") + (buffer/format b "%j" manifest) # make sure it is valid jdn + (buffer/clear b) + (buffer/format b "%.99m\n" manifest) + (spit manifest-name b)) (defn bundle/manifest "Get the manifest for a give installed bundle" @@ -4430,10 +4434,11 @@ `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.` [manifest src &opt dest chmod-mode] - (default dest (last (string/split "/" src))) + (def s (sep)) + (default dest (last (string/split s src))) (default chmod-mode 8r755) - (os/mkdir (string (dyn *syspath*) (sep) "bin")) - (bundle/add-file manifest src (string "bin" (sep) dest) chmod-mode)) + (os/mkdir (string (dyn *syspath*) s "bin")) + (bundle/add-file manifest src (string "bin" s dest) chmod-mode)) (defn bundle/update-all "Reinstall all bundles"