summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-02 19:03:19 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-02 19:04:45 -0800
commitc782bfb900fdda8645f8dfe47aae345e21540633 (patch)
tree7d49925d8d5fee6e21d72f6cdcafe21279376925 /mbld
parent7a08119041e6c1ac8f26f52ba7afff42ac21e631 (diff)
downloadmc-c782bfb900fdda8645f8dfe47aae345e21540633.tar.gz
Update code to match docs.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/install.myr9
-rw-r--r--mbld/parse.myr6
-rw-r--r--mbld/types.myr2
3 files changed, 9 insertions, 8 deletions
diff --git a/mbld/install.myr b/mbld/install.myr
index c5917e5..b5592af 100644
--- a/mbld/install.myr
+++ b/mbld/install.myr
@@ -41,12 +41,13 @@ const movetargs = {b, rm
;;
| `Data dt:
for blob in dt.blobs
- if dt.base.len == 0
- pfx = config.Sharepath
+ if dt.path.len == 0
+ pfx = std.pathcat(config.Sharepath, dt.name)
+ movefile(b, rm, dt.dir, blob, pfx, 0o644)
+ std.slfree(pfx)
else
- pfx = dt.base
+ movefile(b, rm, dt.dir, blob, dt.path, 0o644)
;;
- movefile(b, rm, dt.dir, blob, pfx, 0o644)
;;
| `Gen gt:
/* nothing to do */
diff --git a/mbld/parse.myr b/mbld/parse.myr
index 78f6fc3..302e66f 100644
--- a/mbld/parse.myr
+++ b/mbld/parse.myr
@@ -456,7 +456,7 @@ const myrtarget = {b, p, targ
const datatarget = {b, p, targ
var name, attrs, blobs
- var tags, base
+ var tags, path
match word(p)
| `std.Some n: name = n
@@ -493,7 +493,7 @@ const datatarget = {b, p, targ
for elt in attrs
match elt
| ("tag", tag): tags = std.slpush(tags, tag)
- | ("base", basedir): base = basedir
+ | ("path", pathdir): path = pathdir
| (invalid, ""):
std.fatal("{}: got invalid attr '{}'\n", targ, invalid)
| (invalid, attr):
@@ -505,7 +505,7 @@ const datatarget = {b, p, targ
.dir=std.sldup(p.fdir),
.name=name,
.tags=tags,
- .base=base,
+ .path=path,
.blobs=blobs,
]))
}
diff --git a/mbld/types.myr b/mbld/types.myr
index 545eb36..7958bb9 100644
--- a/mbld/types.myr
+++ b/mbld/types.myr
@@ -67,7 +67,7 @@ pkg bld =
dir : byte[:]
name : byte[:]
tags : byte[:][:]
- base : byte[:]
+ path : byte[:]
blobs : byte[:][:]
;;