chore(forum): add setup debian env script
This commit is contained in:
parent
136606b32e
commit
fff79f32e3
41
forum/env/setup-debian.sh
vendored
Executable file
41
forum/env/setup-debian.sh
vendored
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# 1. Install system compilers, libraries, and package managers
|
||||||
|
# Note: Debian/Ubuntu packages npm separately from nodejs and names Clang headers libclang-dev
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
pkg-config \
|
||||||
|
clang \
|
||||||
|
libclang-dev \
|
||||||
|
graphviz \
|
||||||
|
pipx \
|
||||||
|
nodejs \
|
||||||
|
npm -qq
|
||||||
|
|
||||||
|
# 2. Add local tool paths to ~/.bashrc and active shell
|
||||||
|
pipx ensurepath
|
||||||
|
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
|
||||||
|
grep -q 'export PATH="\$HOME/.cargo/bin:\$HOME/.local/bin:\$PATH"' ~/.bashrc || \
|
||||||
|
echo 'export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
||||||
|
|
||||||
|
# 3. Install CLI binaries
|
||||||
|
# Cargo compiles native Tree-sitter using libclang-dev
|
||||||
|
cargo install tree-sitter-cli
|
||||||
|
pipx install semgrep
|
||||||
|
pipx install mutmut
|
||||||
|
|
||||||
|
# Handle global npm install (avoids sudo if running under nvm)
|
||||||
|
if command -v nvm >/dev/null 2>&1 || [ -n "$NVM_DIR" ]; then
|
||||||
|
npm install -g @sourcegraph/scip-typescript madge @stryker-mutator/core
|
||||||
|
else
|
||||||
|
sudo npm install -g @sourcegraph/scip-typescript madge @stryker-mutator/core
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 4. Verify all commands exist
|
||||||
|
tree-sitter --version && \
|
||||||
|
semgrep --version && \
|
||||||
|
scip-typescript --version && \
|
||||||
|
madge --version && \
|
||||||
|
mutmut --version
|
||||||
Loading…
x
Reference in New Issue
Block a user