Skip to content

Instantly share code, notes, and snippets.

@soupi
Last active May 10, 2020 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soupi/0b9ec8a9edfca8a5ec242a37ea633a02 to your computer and use it in GitHub Desktop.
Save soupi/0b9ec8a9edfca8a5ec242a37ea633a02 to your computer and use it in GitHub Desktop.
stack ghc shortcuts
#!/bin/bash
if [ ! -f ~/.local/bin/ghc ]; then
echo '#!/bin/bash' > ~/.local/bin/ghc;
echo 'stack exec -- ghc $@' >> ~/.local/bin/ghc;
chmod +x ~/.local/bin/ghc;
echo "~/.local/bin/ghc created."
else
echo "~/.local/bin/ghc already exists."
fi
if [ ! -f ~/.local/bin/ghci ]; then
echo '#!/bin/bash' > ~/.local/bin/ghci;
echo 'stack exec -- ghci $@' >> ~/.local/bin/ghci;
chmod +x ~/.local/bin/ghci;
echo "~/.local/bin/ghci created."
else
echo "~/.local/bin/ghci already exists."
fi
if [ ! -f ~/.local/bin/runghc ]; then
echo '#!/bin/bash' > ~/.local/bin/runghc;
echo 'stack exec -- runghc $@' >> ~/.local/bin/runghc;
chmod +x ~/.local/bin/runghc;
echo "~/.local/bin/runghc created."
else
echo "~/.local/bin/runghc already exists."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment