packages feed

haskellscript 0.2.1 → 0.2.2

raw patch · 2 files changed

+9/−4 lines, 2 files

Files

haskellscript.cabal view
@@ -1,5 +1,5 @@ name:                   haskellscript-version:                0.2.1+version:                0.2.2 synopsis:               Command line tool for running Haskell scripts with a hashbang. description:   This tool provides the ability to script in a shell with Haskell (including dependencies) the same way that has been possible with bash scripts or Python.@@ -10,9 +10,13 @@   .   <https://github.com/seanparsons/haskellscript/blob/master/Example.hs>   .+  Lookup weather for your current IP address+  .+  <https://github.com/seanparsons/haskellscript/blob/master/WeatherExample.hs>+  .   /Prerequisites/   .-  A sandbox capable install of [Cabal](https://www.haskell.org/cabal/)+  A sandbox capable install of [Cabal](https://www.haskell.org/cabal/).   .   /Howto/   .
src/HaskellScript.hs view
@@ -91,10 +91,11 @@   let scriptHash = getContentHash scriptDetails   let scriptDir = homeDirectory </> ".haskellscript" </> dependenciesHash   let dependenciesMarker = scriptDir </> ".dependencieswritten"-  dependenciesMarkerExists <- lift $ doesFileExist $ dependenciesMarker+  dependenciesMarkerExists <- lift $ doesFileExist dependenciesMarker   unless dependenciesMarkerExists $ do     -- Remove the directory first.-    lift $ removeDirectoryRecursive scriptDir+    scriptDirExists <- lift $ doesDirectoryExist scriptDir+    lift $ when scriptDirExists $ removeDirectoryRecursive scriptDir     -- Create hashed path directory.     lift $ createDirectoryIfMissing True scriptDir     -- Init sandbox in directory.