fix(leanpkg): remove hack

This commit is contained in:
Gabriel Ebner 2017-04-27 17:58:46 +02:00 committed by Leonardo de Moura
parent 44bfceb6a6
commit 90253e220c
2 changed files with 3 additions and 3 deletions

View file

@ -115,8 +115,8 @@ def main : ∀ (args : list string), io unit
version := "1",
dependencies := []
} user_toml_fn,
-- TODO(gabriel): remove this awesomely disgusting hack
exec_cmd "bash" $ ["-c", "cd $1 && shift && leanpkg add \"$@\" && leanpkg configure", "_", dot_lean_dir] ++ rest
exec_cmd "leanpkg" ("add" :: rest) dot_lean_dir,
exec_cmd "leanpkg" ["configure"] dot_lean_dir
| ["dump"] := read_desc >>= io.print_ln
| _ := io.fail usage

View file

@ -13,7 +13,7 @@ def exec_cmd (cmd : string) (args : list string) (cwd : option string := none) :
let cmdstr := join " " (cmd::args),
io.put_str_ln $ "> " ++
match cwd with
| some cwd := "(cd " ++ cwd ++ "; " ++ cmdstr ++ ")"
| some cwd := cmdstr ++ " # in directory " ++ cwd
| none := cmdstr
end,
ch ← spawn { cmd := cmd, args := args, cwd := cwd },