summaryrefslogtreecommitdiff
path: root/Main.hs
blob: 77fcf0d20d82109192e69d6bf86d72d34b9e8f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Main where

import System.Environment (getArgs)
import Paths_yjftp        (getDataFileName, version)
import Data.Version       (showVersion)
import Network.Yjftp      (runYjftp, defaultCommandList)
import HsConfigure        (runUsersEx)

main :: IO ()
main = do
  args <- getArgs
  case args of
    [ "--version" ] -> putStrLn $ "yjftp " ++ showVersion version
    _               -> do
      src <- getDataFileName "yjftp.hs"
      runUsersEx "yjftp" (Just version) (Just src) (runYjftp defaultCommandList)