|
@@ -46,6 +46,11 @@ declare -a __pip_deps=(
|
|
"pynvim"
|
|
"pynvim"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+declare -a __rust_deps=(
|
|
|
|
+ "fd::fd-find"
|
|
|
|
+ "rg::ripgrep"
|
|
|
|
+)
|
|
|
|
+
|
|
function usage() {
|
|
function usage() {
|
|
echo "Usage: install.sh [<options>]"
|
|
echo "Usage: install.sh [<options>]"
|
|
echo ""
|
|
echo ""
|
|
@@ -110,6 +115,10 @@ function confirm() {
|
|
done
|
|
done
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function stringify_array() {
|
|
|
|
+ echo -n "${@}" | sed 's/ /, /'
|
|
|
|
+}
|
|
|
|
+
|
|
function main() {
|
|
function main() {
|
|
parse_arguments "$@"
|
|
parse_arguments "$@"
|
|
|
|
|
|
@@ -122,13 +131,13 @@ function main() {
|
|
|
|
|
|
if [ "$ARGS_INSTALL_DEPENDENCIES" -eq 1 ]; then
|
|
if [ "$ARGS_INSTALL_DEPENDENCIES" -eq 1 ]; then
|
|
if [ "$INTERACTIVE_MODE" -eq 1 ]; then
|
|
if [ "$INTERACTIVE_MODE" -eq 1 ]; then
|
|
- if confirm "Would you like to install LunarVim's NodeJS dependencies?"; then
|
|
|
|
|
|
+ if confirm "Would you like to install LunarVim's NodeJS dependencies: $(stringify_array ${__npm_deps[@]})?"; then
|
|
install_nodejs_deps
|
|
install_nodejs_deps
|
|
fi
|
|
fi
|
|
- if confirm "Would you like to install LunarVim's Python dependencies?"; then
|
|
|
|
|
|
+ if confirm "Would you like to install LunarVim's Python dependencies: $(stringify_array ${__pip_deps[@]})?"; then
|
|
install_python_deps
|
|
install_python_deps
|
|
fi
|
|
fi
|
|
- if confirm "Would you like to install LunarVim's Rust dependencies?"; then
|
|
|
|
|
|
+ if confirm "Would you like to install LunarVim's Rust dependencies: $(stringify_array ${__rust_deps[@]})?"; then
|
|
install_rust_deps
|
|
install_rust_deps
|
|
fi
|
|
fi
|
|
else
|
|
else
|
|
@@ -335,8 +344,7 @@ function __attempt_to_install_with_cargo() {
|
|
|
|
|
|
# we try to install the missing one with cargo even though it's unlikely to be found
|
|
# we try to install the missing one with cargo even though it's unlikely to be found
|
|
function install_rust_deps() {
|
|
function install_rust_deps() {
|
|
- local -a deps=("fd::fd-find" "rg::ripgrep")
|
|
|
|
- for dep in "${deps[@]}"; do
|
|
|
|
|
|
+ for dep in "${__rust_deps[@]}"; do
|
|
if ! command -v "${dep%%::*}" &>/dev/null; then
|
|
if ! command -v "${dep%%::*}" &>/dev/null; then
|
|
__attempt_to_install_with_cargo "${dep##*::}"
|
|
__attempt_to_install_with_cargo "${dep##*::}"
|
|
fi
|
|
fi
|