Last active
May 10, 2020 08:18
-
-
Save soupi/0b9ec8a9edfca8a5ec242a37ea633a02 to your computer and use it in GitHub Desktop.
stack ghc shortcuts
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 | |
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