Created
February 17, 2015 07:10
-
-
Save songpp/583a26a9c571081c973d to your computer and use it in GitHub Desktop.
haskell hsdev utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
THIS_PROJECT=$(cd "$(dirname "$0")"; pwd); | |
THIS_PROJECT_DIR_NAME=$(basename "$THIS_PROJECT"); | |
MY_SANDBOX=~/tools/dev-sandbox/; | |
set -x; | |
exec 3>&1 | |
rescan() { | |
hsdev start --port 4567 --cache "$THIS_PROJECT/.hsdev" >&3; | |
sleep 2; | |
cd $THIS_PROJECT; | |
hsdev rescan --cabal --project "../$THIS_PROJECT_DIR_NAME" --sandbox $MY_SANDBOX >&3; | |
} | |
$( rescan ) | |
exec 3>&- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment