summaryrefslogtreecommitdiff
path: root/Assistant
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-04-22 20:24:53 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-04-22 20:24:53 -0400
commit4d376b47b7aa506c4f4a4c5ccc83ca2ef1aeacc2 (patch)
tree33ab2e7c4b72d8a7fce40a0e93f63f3d50a6c3ab /Assistant
parentf672c39279366a8927abfcde3050952365f5e0ee (diff)
expose Control.Monad.join
I think I've been looking for that function for some time. Ie, I remember wanting to collapse Just Nothing to Nothing.
Diffstat (limited to 'Assistant')
-rw-r--r--Assistant/Ssh.hs10
-rw-r--r--Assistant/XMPP/Git.hs2
2 files changed, 6 insertions, 6 deletions
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
index 5312eaf77..c7543d3bd 100644
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -105,11 +105,11 @@ removeAuthorizedKeys rsynconly dir pubkey = do
- present.
-}
addAuthorizedKeysCommand :: Bool -> FilePath -> SshPubKey -> String
-addAuthorizedKeysCommand rsynconly dir pubkey = join "&&"
+addAuthorizedKeysCommand rsynconly dir pubkey = intercalate "&&"
[ "mkdir -p ~/.ssh"
- , join "; "
+ , intercalate "; "
[ "if [ ! -e " ++ wrapper ++ " ]"
- , "then (" ++ join ";" (map echoval script) ++ ") > " ++ wrapper
+ , "then (" ++ intercalate ";" (map echoval script) ++ ") > " ++ wrapper
, "fi"
]
, "chmod 700 " ++ wrapper
@@ -217,7 +217,7 @@ mangleSshHostName :: SshData -> String
mangleSshHostName sshdata = "git-annex-" ++ T.unpack (sshHostName sshdata)
++ "-" ++ filter safe extra
where
- extra = join "_" $ map T.unpack $ catMaybes
+ extra = intercalate "_" $ map T.unpack $ catMaybes
[ sshUserName sshdata
, Just $ sshDirectory sshdata
]
@@ -229,7 +229,7 @@ mangleSshHostName sshdata = "git-annex-" ++ T.unpack (sshHostName sshdata)
{- Extracts the real hostname from a mangled ssh hostname. -}
unMangleSshHostName :: String -> String
unMangleSshHostName h = case split "-" h of
- ("git":"annex":rest) -> join "-" (beginning rest)
+ ("git":"annex":rest) -> intercalate "-" (beginning rest)
_ -> h
{- Does ssh have known_hosts data for a hostname? -}
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index 808fbbc53..68362c848 100644
--- a/Assistant/XMPP/Git.hs
+++ b/Assistant/XMPP/Git.hs
@@ -97,7 +97,7 @@ xmppPush cid gitpush handledeferred = runPush SendPack cid handledeferred $ do
env <- liftIO getEnvironment
path <- liftIO getSearchPath
let myenv = M.fromList
- [ ("PATH", join [searchPathSeparator] $ tmpdir:path)
+ [ ("PATH", intercalate [searchPathSeparator] $ tmpdir:path)
, (relayIn, show inf)
, (relayOut, show outf)
, (relayControl, show controlf)