diff --git a/README.md b/README.md index 138c1ec..0d292e7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ You might want to run `stack install --ghc-options=-dynamic` in order to reduce ### Releases For the moment, releases are hosted on the GitHub platform. They consist of a Zip archive with the README, the LICENSE file and the binary, whose Haskell -libraries are bundled in (but the C libraries are still dynamically linked (for now)). +libraries are bundled in (but the C libraries are still dynamically linked (for now)). +The releases might not be as up-to-date as the `master` branch, though. ## Usage diff --git a/package.yaml b/package.yaml index bee97ce..dce89a5 100644 --- a/package.yaml +++ b/package.yaml @@ -35,4 +35,4 @@ license: MIT maintainer: Théophile Choutri name: feed-extract synopsis: feed-extract extracts the data from FeedReader's database and exports it to OPML -version: '0.0.1' +version: '0.0.2' diff --git a/prepare-release.sh b/prepare-release.sh index d0ebc51..9804837 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash echo "[+] Preparing release ${1}" -mkdir feed-extract-${1} -cp LICENSE.md README.md .stack-work/install/x86_64-linux-tinfo6/lts-9.1/8.0.2/bin/feed-extract feed-extract-${1}/ -zip -rv feed-extract-${1}.zip feed-extract-${1} +if [[ -z "${1}" ]] +then + echo "[!] You really need to give me a version number, you know?" +else + mkdir feed-extract-"${1}" + FEEDEXTRACT_PATH=$(stack path --local-install-root) + cp LICENSE.md README.md ${FEEDEXTRACT_PATH}/bin/feed-extract feed-extract-"${1}"/ + zip -rv feed-extract-"${1}".zip feed-extract-"${1}" +fi diff --git a/src/Main.hs b/src/Main.hs index e65e256..e46f02c 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -9,6 +9,10 @@ main = do [] -> do putStrLn "[!] You must specify the database's file." putStrLn "[!] It is usually located at ~/.local/share/feedreader/data/" + ("-h":_) -> help + ("--help":_) -> help + ("-v":_) -> version + ("--version":_) -> version (path:_) -> do doesIt <- doesFileExist path if doesIt then @@ -19,3 +23,9 @@ main = do else do putStrLn "[!] Nah, you really need to give a *real* path :/" + +help :: IO () +help = putStrLn "Usage: feed-extract PATH_TO_DATABASE" + +version :: IO () +version = putStrLn "Feed-extract v0.0.2"