From: Cameron Ball Date: Fri, 14 Jun 2019 06:24:21 +0000 (+0800) Subject: Add an option to push X-Git-Url: http://cameron1729.xyz/?p=xyz.git;a=commitdiff_plain;h=4bf57046def14a89bf270a8a2f2bbc52c3cd9ebf Add an option to push --- diff --git a/app/Main.hs b/app/Main.hs index 0b0c25b..267ca5f 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -82,6 +82,13 @@ entry = do else return () build + putStrLn "Do you want to push this entry?" + push <- getLine + + if (push == "y") + then (callCommand $ "git add . && git commit -m \"" ++ entryName ++ "\" && git push") >> putStrLn "Thank for using xyz" + else return () + usage :: IO () usage = putStr . ununlines $ [ "usage: xyz ",