Skip to content

Instantly share code, notes, and snippets.

@stites
Forked from mstksg/shakeup.sh
Created November 15, 2017 17:21
Show Gist options
  • Select an option

  • Save stites/bc45f92f567af90ee73e4ce7cd263f80 to your computer and use it in GitHub Desktop.

Select an option

Save stites/bc45f92f567af90ee73e4ce7cd263f80 to your computer and use it in GitHub Desktop.
Generate a Shakefile scaffold
#!/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