Skip to content

Commit

Permalink
Make sure openssl is available for cargo-edit (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored Sep 23, 2023
1 parent e107979 commit f587f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions scripts/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ install() {
case "$2" in
libudev) set libudev-dev ;;
libusb-1.0) set libusb-1.0-0-dev ;;
openssl) set libssl-dev ;;
*) e "Internal error: _install_apt unimplemented for $*" ;;
esac ;;
esac
Expand Down
5 changes: 3 additions & 2 deletions scripts/wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ run() {
}

ensure_cargo() {
g=
c=
local g
local c
if [ $# -eq 4 ]; then
g=" ($3?rev=$4#.\{8\})"
c="--git=$3 --rev=$4"
fi
if ! cargo install --list --root="$CARGO_ROOT" | grep -q "^$1 v$2$g:\$"; then
[ "$1" = cargo-edit ] && ensure lib openssl
x cargo install --locked --root="$CARGO_ROOT" "$1@$2" $c
fi
}
Expand Down

0 comments on commit f587f60

Please sign in to comment.