Last active
March 21, 2019 12:52
-
-
Save dardo82/203800247617cd404519d24432159d36 to your computer and use it in GitHub Desktop.
Install OPAM
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/sh | |
OPAMROOT="${1-/usr/local/opam}"; SH="${SHELL-/bin/sh}"; SC="$HOME/.${SH//*\/}rc" | |
echo "\n# Set OPAM root dir.\nexport OPAMROOT=\"$OPAMROOT\"\n\n# Set OPAM PATHs.\nexport PATH=\"" \$OPAMROOT/default/{,s}bin: \$PATH\" | sed "s/ \\$/$/g" >> $SC | |
sudo sh -c "port install opam;mkdir -v $OPAMROOT;chown -v $USER:admin $OPAMROOT" | |
opam init --auto-setup --root=$OPAMROOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment