Skip to content

Commit

Permalink
Merge pull request #1 from psibi/master
Browse files Browse the repository at this point in the history
Keep fork up-to-date
  • Loading branch information
gutjuri committed Oct 9, 2020
2 parents 12ab04e + 973b61a commit e42aea9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.8.1

* When pages are updated, the client now shows the download location.

# 0.8.0

* Split the library into more parts.
Expand Down
7 changes: 5 additions & 2 deletions src/Tldr/App/Handler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ updateTldrPages = do
let repoDir = dataDir </> "tldr"
repoExists <- doesDirectoryExist repoDir
if repoExists
then runProcess_ $
setWorkingDir repoDir $ proc "git" ["pull", "origin", "master"]
then do
putStrLn $ "Downloading tldr pages to " ++ repoDir
runProcess_ $
setWorkingDir repoDir $ proc "git" ["pull", "origin", "master"]
else initializeTldrPages

computeLocale :: Maybe String -> Locale
Expand Down Expand Up @@ -137,6 +139,7 @@ initializeTldrPages = do
unless initialized $ do
dataDir <- getXdgDirectory XdgData tldrDirName
createDirectoryIfMissing False dataDir
putStrLn $ "Initialising tldr page storage in " ++ dataDir
runProcess_ $ setWorkingDir dataDir $ proc "git" ["clone", repoHttpsUrl]

getCheckDirs :: ViewOptions -> [String]
Expand Down

0 comments on commit e42aea9

Please sign in to comment.