-
-
Save stites/bc45f92f567af90ee73e4ce7cd263f80 to your computer and use it in GitHub Desktop.
Generate a Shakefile scaffold
This file contains hidden or 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 | |
| SHAKEFILE=${1:-"Shakefile"} | |
| if [ ! -e "$SHAKEFILE" ]; then | |
| tee -a "$SHAKEFILE" << 'EOF' > /dev/null | |
| import Development.Shake | |
| opts = shakeOptions { shakeFiles = ".shake/" | |
| , shakeProgress = progressSimple } | |
| (~>) = phony | |
| main :: IO () | |
| main = shakeArgs opts $ do | |
| want [] | |
| "clean" ~> removeFilesAfter ".shake" ["//*"] | |
| -- phony "" $ do | |
| -- need [] | |
| -- "" *> \_ -> do | |
| -- cmd "" [] | |
| EOF | |
| echo "Shakefile skeleton written to $SHAKEFILE" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment