#!/bin/sh if [ "$(id -u)" -eq 0 ] ; then echo "Run as a regular user" exit 1 fi set -ex nproc=1 case "$(uname)" in Darwin|OpenBSD) nproc="$(sysctl -n hw.ncpu)" ;; Linux) nproc="$(nproc)" ;; esac codedir="${CODEDIR:-$HOME/scm}" nvimdir="${codedir}/nvim" # On OpenBSD: # Workaround for OpenBSD's make being called endlessly... # #!/bin/sh # exec gmake "$@" # Call it `make` and place it in your path before the system make. # Then: # pkg_add gmake cmake cargo rust clang-tools-extra # Also in the environment: # LIBCLANG_PATH=/usr/local/llvm21/lib # CARGO_TARGET_DIR=$HOME/.cache/cargo-target-dir # /tmp is usually small... # Then cargo for tree-sitter-cli... # cargo install tree-sitter-cli # Also add ~/.cargo/bin to your path when you're done. if ! [ -d "$nvimdir" ] ; then git clone https://github.com/neovim/neovim "$nvimdir" fi cd "$nvimdir" git clean -fdx . rm -rf build || echo "" make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/.local" -j"$nproc" make install cd -