Skip to content

Commit

Permalink
remove just from setup and fix cargopkgs check (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebadob authored Jan 7, 2025
1 parent bccb94d commit a92374e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ setup:
set -euxo pipefail
clear
echo "Installing necessary tools: just, sd, mdbook, mdbook-admonish, sqlx-cli"
echo "Installing necessary tools: sd, mdbook, mdbook-admonish, sqlx-cli"
readarray -t cargopkgs < <(cargo install --list | cut -d' ' -f1 | sort | uniq)
for pkg in just sd mdbook mdbook-admonish; do
for pkg in sd mdbook mdbook-admonish; do
if command -v "$pkg" &>/dev/null; then
if printf '%s\0' "${cargopkgs[@]}" | grep -qw "$pkg"; then
if ! printf '%s\0' "${cargopkgs[@]}" | grep -qw "$pkg"; then
cargo install "$pkg"
fi
else
cargo install "$pkg"
fi
done
if command -v sqlx &>/dev/null; then
if printf '%s\0' "${cargopkgs[@]}" | grep -qw sqlx-cli; then
if ! printf '%s\0' "${cargopkgs[@]}" | grep -qw sqlx-cli; then
cargo install sqlx-cli --no-default-features --features rustls,sqlite,postgres
fi
else
Expand Down

0 comments on commit a92374e

Please sign in to comment.