aboutsummaryrefslogtreecommitdiff
path: root/clpm.icl
diff options
context:
space:
mode:
authorCamil Staps2017-02-07 19:10:34 +0100
committerCamil Staps2017-02-07 19:10:34 +0100
commitf43db4cbbf9bbcde928daa49ce3fac96be1fa822 (patch)
tree32ba6071a9b407cdf9fd92b2be748a01391b8c66 /clpm.icl
parentMake main module optional (diff)
Improved installation
Diffstat (limited to 'clpm.icl')
-rw-r--r--clpm.icl14
1 files changed, 8 insertions, 6 deletions
diff --git a/clpm.icl b/clpm.icl
index b2fa764..a18c2cc 100644
--- a/clpm.icl
+++ b/clpm.icl
@@ -90,15 +90,15 @@ cmd_install pkg io w
= (io <<< fromError solv <<< "\r\n", w)
# (Ok solv) = solv
# io = io <<< "Installing dependencies:\r\n"
-# (io,w) = installAll solv io w
-= (io,w)
+= installAll solv io w
where
installAll :: [(Dependency, Version)] *File *World -> *(*File, *World)
installAll [] f w = (f,w)
installAll [(d,v):ds] f w
- # f = f <<< "Installing " <<< depName d <<< ":" <<< toString v <<< "...\r\n"
- # (err,w) = install d v w
+ #! f = f <<< "Installing " <<< depName d <<< ":" <<< toString v <<< "...\r\n"
+ #! (err,w) = install d v w
| isError err = (f <<< fromError err <<< "\r\n", w)
+ #! f = f <<< fromOk err <<< "\r\n"
= installAll ds f w
cmd_make :: [String] Package *File *World -> *(*File, *World)
@@ -109,9 +109,11 @@ cmd_make opts pkg io w
| isError ps
= (io <<< fromError ps <<< "\r\n", w)
# ps = fromOk ps
-# (r,w) = syscall (foldl (+) "clm" [" -I " + p \\ p <- ps] +
+# cmd = foldl (+) "clm" [" -I " + p \\ p <- ps] +
foldl (+) "" [" " + f \\ f <- optionsToFlags pkg.options ++ opts] +
- " " + fromJust pkg.main + " -o " + fromJust pkg.main) w
+ " " + fromJust pkg.main + " -o " + fromJust pkg.main
+#! io = io <<< cmd <<< "\r\n"
+#! (r,w) = syscall cmd w
= (io,w)
parseArgs :: (Arguments [String] -> ([String], Arguments))