diff --git a/jpm/commands.janet b/jpm/commands.janet index 4fd2f0c..f59afc1 100644 --- a/jpm/commands.janet +++ b/jpm/commands.janet @@ -325,6 +325,7 @@ (def tree-bin (string abs-tree sep "bin")) (def tree-lib (string abs-tree sep "lib")) (def tree-man (string abs-tree sep "man")) + (create-dirs abs-tree) (os/mkdir abs-tree) (os/mkdir tree-bin) (os/mkdir tree-lib) diff --git a/jpm/declare.janet b/jpm/declare.janet index d1fa2be..b3f0252 100644 --- a/jpm/declare.janet +++ b/jpm/declare.janet @@ -27,6 +27,7 @@ (array/push (dyn :installed-files) path) (def dir (string (dyn :dest-dir "") destdir)) (task "install" [] + (create-dirs dir) (os/mkdir dir) (copy src dir))) @@ -112,7 +113,6 @@ (rule metaname [] (print "generating meta file " metaname "...") (flush) - (os/mkdir (find-build-dir)) (create-dirs metaname) (spit metaname (string/format "# Metadata for static library %s\n\n%.20p" @@ -343,6 +343,7 @@ (rule manifest ["uninstall"] (print "generating " manifest "...") (flush) + (create-dirs manifests) (os/mkdir manifests) (def has-git (os/stat ".git" :mode)) (def bundle-type (dyn :bundle-type (if has-git :git :local))) diff --git a/jpm/pm.janet b/jpm/pm.janet index 5d56d39..75c9960 100644 --- a/jpm/pm.janet +++ b/jpm/pm.janet @@ -197,6 +197,7 @@ path to the downloaded or cached soure code." [url bundle-type &opt tag shallow] (def cache (find-cache)) + (create-dirs cache) (os/mkdir cache) (def id (filepath-replace (string bundle-type "_" tag "_" url))) (def bundle-dir (string cache "/" id)) @@ -213,6 +214,7 @@ # initialize bundle index (unless installed-bundle-index (set installed-bundle-index @{}) + (create-dirs (find-manifest-dir)) (os/mkdir (find-manifest-dir)) (each manifest (os/dir (find-manifest-dir)) (def bundle-data (parse (slurp (string (find-manifest-dir) "/" manifest))))