ripgrep.sh 506 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # microsoft/ripgrep-prebuilt doesn't support riscv64.
  3. # Tracking PR: https://github.com/microsoft/ripgrep-prebuilt/pull/41
  4. if [ "$#" -ne 1 ]; then
  5. echo "Usage: $0 <path_to_node_modules>"
  6. exit 1
  7. fi
  8. RG_PATH="$1/@vscode/ripgrep/bin/rg"
  9. RG_VERSION="14.1.1-4"
  10. echo "Replacing ripgrep binary with riscv64 one"
  11. rm "${RG_PATH}"
  12. curl --silent --fail -L https://github.com/riscv-forks/ripgrep-riscv64-prebuilt/releases/download/${RG_VERSION}/rg -o "${RG_PATH}"
  13. chmod +x "${RG_PATH}"