omarchy/bin/omarchy-install-dev-env
Florian Hammerschmidt b40a5a9a9f
Add OCaml (#598)
* Add OCaml

Add OCaml according to https://ocaml.org/install#linux_mac_bsd

I included also the development environment (LSP and some tools) as I figured this would be actually omakase but I can also remove it if we want to keep it clean.

* small fix
2025-08-10 13:41:06 +02:00

59 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
if [[ -z "$1" ]]; then
echo "Usage: omarchy-instal-dev-env <ruby|node|bun|go|laravel|python|elixir|rust|java|ocaml>" >&2
exit 1
fi
case "$1" in
ruby)
echo -e "Installing Ruby on Rails...\n"
mise use --global ruby@latest
mise settings add idiomatic_version_file_enable_tools ruby
mise x ruby -- gem install rails --no-document
;;
node)
echo -e "Installing Node.js...\n"
mise use --global node@lts
;;
bun)
echo -e "Installing Bun...\n"
mise use -g bun@latest
;;
go)
echo -e "Installing Go...\n"
mise use --global go@latest
;;
laravel)
echo -e "Installing PHP and Laravel...\n"
bash -c "$(curl -fsSL https://php.new/install/linux)"
;;
python)
echo -e "Installing Python...\n"
mise use --global python@latest
echo -e "\nInstalling uv...\n"
wget -qO- https://astral.sh/uv/install.sh | sh
;;
elixir)
echo -e "Installing Elixir...\n"
mise use --global erlang@latest
mise use --global elixir@latest
mise x elixir -- mix local.hex --force
;;
rust)
echo -e "Installing Rust...\n"
bash -c "$(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs)" -- -y
;;
java)
echo -e "Installing Java...\n"
mise use --global java@latest
;;
ocaml)
echo -e "Installing OCaml...\n"
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
opam init --yes
eval "$(opam env)"
opam install ocaml-lsp-server odoc ocamlformat utop --yes
;;
esac