summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-16 21:05:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-16 21:05:39 -0400
commit1c8fab94b048533ebe6104a8b2d15154764b64b4 (patch)
treee296bce05a63fb322e6a6b53870896ef8a9ea5f5 /doc
parent455721597b4ed8d9e2379e66ccc47a4c9459867c (diff)
parent2f515fb57f1316bd5732faa4ce03d30ed099b74a (diff)
Merge remote-tracking branch 'branchable/master'
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/check_for_curl_in_configure.hs.mdwn39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/bugs/check_for_curl_in_configure.hs.mdwn b/doc/bugs/check_for_curl_in_configure.hs.mdwn
new file mode 100644
index 000000000..ee24769ce
--- /dev/null
+++ b/doc/bugs/check_for_curl_in_configure.hs.mdwn
@@ -0,0 +1,39 @@
+I thought this might be useful, since curl is being used for the URL backend, it might be worth checking for it's existence.
+
+<pre>
+diff --git a/configure.hs b/configure.hs
+index 772ba54..1a563e0 100644
+--- a/configure.hs
++++ b/configure.hs
+@@ -13,6 +13,7 @@ tests = [
+ , TestCase "uuid generator" $ selectCmd "uuid" ["uuid", "uuidgen"]
+ , TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
+ , TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
++ , TestCase "curl" $ requireCmd "curl" "curl --version >/dev/null"
+ , TestCase "unicode FilePath support" $ unicodeFilePath
+ ] ++ shaTestCases [1, 256, 512, 224, 384]
+</pre>
+
+also in Backend/URL.hs is it worth making a minor change to the way curl is called (I'm not sure if the following is correct or not)
+
+<pre>
+diff --git a/Backend/URL.hs b/Backend/URL.hs
+index 29dc8fe..4afcf86 100644
+--- a/Backend/URL.hs
++++ b/Backend/URL.hs
+@@ -50,10 +50,13 @@ dummyFsck _ _ _ = return True
+ dummyOk :: Key -> Annex Bool
+ dummyOk _ = return True
+
++curl :: [CommandParam] -> IO Bool
++curl = boolSystem "curl"
++
+ downloadUrl :: Key -> FilePath -> Annex Bool
+ downloadUrl key file = do
+ showNote "downloading"
+ showProgress -- make way for curl progress bar
+- liftIO $ boolSystem "curl" [Params "-# -o", File file, File url]
++ liftIO $ curl [Params "-# -o", File file, File url]
+ where
+ url = join ":" $ drop 1 $ split ":" $ show key
+</pre>