Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jpm/commands.janet
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion jpm/declare.janet
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)))
Expand Down
2 changes: 2 additions & 0 deletions jpm/pm.janet
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))))
Expand Down