Created
December 22, 2025 00:52
-
-
Save neoSnakex34/e7d1108b69908d3e3d504b03ebf7c7be to your computer and use it in GitHub Desktop.
a post install script for c/c++ devcontainer
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 | |
| echo "downloading Helix..." | |
| curl -s https://api.github.com/repos/helix-editor/helix/releases/latest \ | |
| | jq -r '.assets[] | select(.name | test("x86_64-linux.tar.xz")) | .browser_download_url' > helix_download_url.txt | |
| if [[ ! -s helix_download_url.txt ]]; then | |
| echo "no download found!" | |
| exit 1 | |
| fi | |
| echo "downloading latest helix package..." | |
| curl -LO $(cat helix_download_url.txt) | |
| echo "extracting..." | |
| tar -xf helix*.tar.xz | |
| # TODO make it work with rootless docker | |
| echo "installing in /usr/local/bin/" | |
| mv helix*/hx /usr/local/bin/ | |
| echo "copying config..." | |
| mkdir -p ~/.config/helix/ | |
| mv helix*/runtime ~/.config/helix/ | |
| echo '[lsp] | |
| command = "clangd" | |
| root_file = "CMakeLists.txt" | |
| filetypes = ["c", "cpp"]' > ~/.config/helix/clangd.toml | |
| echo "config complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment