aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/src/Fpm.hs
diff options
context:
space:
mode:
authorBrad Richardson <everythingfunctional@protonmail.com>2020-10-26 17:16:44 -0500
committerGitHub <noreply@github.com>2020-10-26 17:16:44 -0500
commit4443986b3d5690ce4ee8bbc348834caa2040be23 (patch)
tree0553b054c43c89edab17a3d6959f7adb84648a61 /bootstrap/src/Fpm.hs
parente92d9c9c406aff61d404d2afe71c416ed019beb0 (diff)
parent488bdd06ab78cec3085aa86b6dbe36a98f58eb86 (diff)
downloadfpm-4443986b3d5690ce4ee8bbc348834caa2040be23.tar.gz
fpm-4443986b3d5690ce4ee8bbc348834caa2040be23.zip
Merge pull request #213 from everythingfunctional/bootstrap_submodule_support
Bootstrap submodule support
Diffstat (limited to 'bootstrap/src/Fpm.hs')
-rw-r--r--bootstrap/src/Fpm.hs18
1 files changed, 12 insertions, 6 deletions
diff --git a/bootstrap/src/Fpm.hs b/bootstrap/src/Fpm.hs
index d9de668..115b63e 100644
--- a/bootstrap/src/Fpm.hs
+++ b/bootstrap/src/Fpm.hs
@@ -616,12 +616,15 @@ fetchDependency name version = do
putStrLn "Simple dependencies are not yet supported :("
undefined
GitVersion versionSpec -> do
- system
- ("git init " ++ clonePath)
+ system ("git init " ++ clonePath)
case gitVersionSpecRef versionSpec of
Just ref -> do
system
- ("git -C " ++ clonePath ++ " fetch " ++ gitVersionSpecUrl versionSpec ++ " "
+ ( "git -C "
+ ++ clonePath
+ ++ " fetch "
+ ++ gitVersionSpecUrl versionSpec
+ ++ " "
++ (case ref of
Tag tag -> tag
Branch branch -> branch
@@ -630,9 +633,12 @@ fetchDependency name version = do
)
Nothing -> do
system
- ("git -C " ++ clonePath ++ " fetch " ++ gitVersionSpecUrl versionSpec)
- system
- ("git -C " ++ clonePath ++ " checkout -qf FETCH_HEAD")
+ ( "git -C "
+ ++ clonePath
+ ++ " fetch "
+ ++ gitVersionSpecUrl versionSpec
+ )
+ system ("git -C " ++ clonePath ++ " checkout -qf FETCH_HEAD")
return (name, clonePath)
PathVersion versionSpec -> return (name, pathVersionSpecPath versionSpec)