From 38c48f4383dc9e54fcbbd2c2a4a7554b12ad7aee Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Thu, 1 Mar 2012 20:14:38 -0800 Subject: [PATCH] Shellish -> Shelly --- Shellish.hs => Shelly.hs | 8 +++---- shellish.cabal | 47 ---------------------------------------- shelly.cabal | 47 ++++++++++++++++++++++++++++++++++++++++ test/drain.hs | 4 ++-- 4 files changed, 53 insertions(+), 53 deletions(-) rename Shellish.hs => Shelly.hs (99%) delete mode 100644 shellish.cabal create mode 100644 shelly.cabal diff --git a/Shellish.hs b/Shelly.hs similarity index 99% rename from Shellish.hs rename to Shelly.hs index 00fe210..b4f0ff5 100644 --- a/Shellish.hs +++ b/Shelly.hs @@ -6,10 +6,10 @@ -- this module is (unlike standard Haskell filesystem functionality) -- thread-safe: each ShIO maintains its own environment and its own working -- directory. -module Shellish +module Shelly ( -- * Entering ShIO. - ShIO, shellish, sub, silently, verbosely + ShIO, shelly, sub, silently, verbosely -- * Modifying and querying environment. , setenv, getenv, cd, chdir, pwd @@ -284,8 +284,8 @@ sub a = do -- inherited from the current process-wide values. Any subsequent changes in -- processwide working directory or environment are not reflected in the -- running ShIO. -shellish :: MonadIO m => ShIO a -> m a -shellish a = do +shelly :: MonadIO m => ShIO a -> m a +shelly a = do env <- liftIO $ getEnvironment dir <- liftIO $ getCurrentDirectory let def = St { sCode = 0 diff --git a/shellish.cabal b/shellish.cabal deleted file mode 100644 index 7766bf3..0000000 --- a/shellish.cabal +++ /dev/null @@ -1,47 +0,0 @@ -Name: shellish - --- The package version. See the Haskell package versioning policy --- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for --- standards guiding when and how versions should be incremented. -Version: 0.2.0 - -Synopsis: shell-/perl- like (systems) programming in Haskell - -Description: The shellisg package provides a single module for convenient - \"systems\" programming in Haskell, similar in spirit to POSIX - shells or PERL. - . - * Elegance and safety is sacrificed for conciseness and - swiss-army-knife-ness. - . - * The interface exported by Shellish is thread-safe. - . - Overall, the module should help you to get a job done quickly, - without getting too dirty. - -Homepage: http://repos.mornfall.net/shellish -License: BSD3 -License-file: LICENSE -Author: Petr Rockai -Maintainer: me@mornfall.net -Category: Development -Build-type: Simple -Cabal-version: >=1.6 - --- Extra-source-files: - -Library - -- Modules exported by the library. - Exposed-modules: Shellish - - Build-depends: mtl, process, filepath, bytestring, text, base >= 4 && < 5, time, directory, - unix-compat - - ghc-options: -Werror -Wall - -Executable drain - main-is: test/drain.hs - -source-repository head - type: darcs - location: http://repos.mornfall.net/shellish diff --git a/shelly.cabal b/shelly.cabal new file mode 100644 index 0000000..3a1c9cf --- /dev/null +++ b/shelly.cabal @@ -0,0 +1,47 @@ +Name: shelly + +Version: 0.3.0 +Synopsis: shell-like (systems) programming in Haskell + +Description: Shelly is a package provides a single module for convenient + systems programming in Haskell, similar in spirit to POSIX + shells. + . + * Shelly is aimed at getting things done rather than + being a demonstration of elegance. + . + * Shelly maintains its own environment, making it thread-safe. + . + These are in contrast to HSH. Elegance in HSH comes from polymorphic input and output. + If you frequently want a different data type than Text from running a system command, you may want to use HSH. + . + Shelly is a fork of Shellish that features low memory usage and fixes a handle draining bug. + +Homepage: http://github.com/gregwebs/shelly +License: BSD3 +License-file: LICENSE +Author: Petr Rockai, Greg Weber +Maintainer: Greg Weber +Category: Development +Build-type: Simple +Cabal-version: >=1.6 + +-- Extra-source-files: + +Library + -- Modules exported by the library. + Exposed-modules: Shelly + + Build-depends: mtl, process, filepath, bytestring, text, base >= 4 && < 5, time, directory, + unix-compat + + ghc-options: -Werror -Wall + +-- demonstarated that command output in Shellish was not shown until after the command finished +-- not necessary anymore +-- Executable drain +-- main-is: test/drain.hs + +source-repository head + type: darcs + location: http://repos.mornfall.net/shelly diff --git a/test/drain.hs b/test/drain.hs index 5a29e27..abfa3f7 100644 --- a/test/drain.hs +++ b/test/drain.hs @@ -1,9 +1,9 @@ {-# Language OverloadedStrings #-} -import Shellish +import Shelly main :: IO () main = - shellish $ do + shelly $ do res <- run "test/drain.sh" [] echo "haskell done" echo res