Linux and OSX standalone builds put the bundled gpg last in PATH, so any system gpg will be preferred over it.

This commit is contained in:
Joey Hess 2016-02-19 16:19:19 -04:00
parent f1cebd1bf9
commit 398d93d4d2
Failed to extract signature
6 changed files with 37 additions and 10 deletions

View file

@ -26,6 +26,9 @@ progDir topdir = topdir
progDir topdir = topdir </> "bin"
#endif
extraProgDir :: FilePath -> FilePath
extraProgDir topdir = topdir </> "extra"
installProg :: FilePath -> FilePath -> IO (FilePath, FilePath)
installProg dir prog = searchPath prog >>= go
where
@ -41,7 +44,9 @@ main = getArgs >>= go
where
go [] = error "specify topdir"
go (topdir:_) = do
let dir = progDir topdir
createDirectoryIfMissing True dir
installed <- forM bundledPrograms $ installProg dir
writeFile "tmp/standalone-installed" (show installed)
installed <- forM
[ (progDir topdir, preferredBundledPrograms)
, (extraProgDir topdir, extraBundledPrograms) ] $ \(dir, progs) -> do
createDirectoryIfMissing True dir
forM progs $ installProg dir
writeFile "tmp/standalone-installed" (show (concat installed))