Skip to content

Commit 9a071d4

Browse files
committed
---
yaml --- r: 6719 b: refs/heads/master c: ce24ce1 h: refs/heads/master i: 6717: 4c70668 6715: 8e7ceed 6711: 4c6fafe 6703: eeb3e31 6687: f24bc0f 6655: 3940b4b v: v3
1 parent df1a628 commit 9a071d4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: aa3d58c8c0a2e52b2893328a8d1940e5fbd41303
2+
refs/heads/master: ce24ce1b5f890f0774baa2db800aafb500d518b7

trunk/src/cargo/cargo.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,13 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
154154
name = str::slice(name, 0u, ri as uint);
155155
}
156156
log #fmt["Installing: %s", name];
157-
let old = fs::list_dir(".");
158-
run::run_program("rustc", [cf]);
159-
let new = fs::list_dir(".");
157+
let old = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
158+
run::run_program("rustc", [name + ".rc"]);
159+
let new = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
160160
let created = vec::filter::<str>({ |n| !vec::member::<str>(n, old) }, new);
161161
for ct: str in created {
162-
if str::ends_with(ct, os::exec_suffix()) {
162+
if (os::exec_suffix() != "" && str::ends_with(ct, os::exec_suffix())) ||
163+
(os::exec_suffix() == "" && !str::starts_with(ct, "lib")) {
163164
log #fmt[" bin: %s", ct];
164165
// FIXME: need libstd fs::copy or something
165166
run::run_program("cp", [ct, c.bindir]);

0 commit comments

Comments
 (0)