oops, wrong system
This commit is contained in:
parent
a36c39ad0a
commit
0561ea1b28
3 changed files with 6 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
module BackendUrl (backend) where
|
module BackendUrl (backend) where
|
||||||
|
|
||||||
import System.Posix.Process
|
import System.Cmd
|
||||||
import IO
|
import IO
|
||||||
import Types
|
import Types
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ dummyRemove state url = return False
|
||||||
downloadUrl :: State -> Key -> FilePath -> IO Bool
|
downloadUrl :: State -> Key -> FilePath -> IO Bool
|
||||||
downloadUrl state url file = do
|
downloadUrl state url file = do
|
||||||
putStrLn $ "download: " ++ url
|
putStrLn $ "download: " ++ url
|
||||||
result <- try $ executeFile "curl" True ["-o", file, url] Nothing
|
result <- try $ rawSystem "curl" ["-o", file, url]
|
||||||
case (result) of
|
case (result) of
|
||||||
Left _ -> return False
|
Left _ -> return False
|
||||||
Right _ -> return True
|
Right _ -> return True
|
||||||
|
|
|
@ -26,10 +26,10 @@ import System
|
||||||
import System.Directory
|
import System.Directory
|
||||||
import System.Posix.Directory
|
import System.Posix.Directory
|
||||||
import System.Path
|
import System.Path
|
||||||
|
import System.Cmd
|
||||||
import System.Cmd.Utils
|
import System.Cmd.Utils
|
||||||
import System.IO
|
import System.IO
|
||||||
import IO (bracket_)
|
import IO (bracket_)
|
||||||
import System.Posix.Process
|
|
||||||
import Data.String.Utils
|
import Data.String.Utils
|
||||||
import Data.Map as Map hiding (map, split)
|
import Data.Map as Map hiding (map, split)
|
||||||
import Network.URI
|
import Network.URI
|
||||||
|
@ -145,7 +145,7 @@ gitCommandLine repo params = assertlocal repo $
|
||||||
{- Runs git in the specified repo. -}
|
{- Runs git in the specified repo. -}
|
||||||
gitRun :: GitRepo -> [String] -> IO ()
|
gitRun :: GitRepo -> [String] -> IO ()
|
||||||
gitRun repo params = assertlocal repo $ do
|
gitRun repo params = assertlocal repo $ do
|
||||||
r <- executeFile "git" True (gitCommandLine repo params) Nothing
|
r <- rawSystem "git" (gitCommandLine repo params)
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
{- Runs a git subcommand and returns its output. -}
|
{- Runs a git subcommand and returns its output. -}
|
||||||
|
|
2
TODO
2
TODO
|
@ -1,5 +1,7 @@
|
||||||
* bug when annexing files in a subdir of a git repo
|
* bug when annexing files in a subdir of a git repo
|
||||||
* how to handle git mv file?
|
* how to handle git mv file?
|
||||||
|
* if curl fails to download, git-annex crashes and does not complete
|
||||||
|
further actions.. exception seems to somehow not get caught
|
||||||
|
|
||||||
* query remotes for their annex.uuid settings
|
* query remotes for their annex.uuid settings
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue