Rework compile_all_bins

This commit is contained in:
parazyd
2022-05-16 18:46:24 +02:00
parent 698db2bd9d
commit 33f6256948
4 changed files with 11 additions and 16 deletions

4
Cargo.lock generated
View File

@@ -3383,9 +3383,9 @@ dependencies = [
[[package]]
name = "rustls-pemfile"
version = "0.3.0"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360"
checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9"
dependencies = [
"base64",
]

View File

@@ -62,7 +62,7 @@ ntp = {version = "0.5.0", optional = true}
# TLS cert utilities
ed25519-compact = {version = "1.0.11", features = ["pem"], optional = true}
rcgen = {version = "0.9.2", features = ["pem"], optional = true}
rustls-pemfile = {version = "0.3.0", optional = true}
rustls-pemfile = {version = "1.0.0", optional = true}
# Encoding
hex = {version = "0.4.3", optional = true}

View File

@@ -165,7 +165,7 @@ def main():
])
if args.update and ret:
print(f"Update {dep} from {ret[0]} to {ret[1]}? (y/N)")
print(f"Update {dep} from {ret[0]} to {ret[1]}? (y/N): ", end="")
choice = input()
if choice and (choice == "y" or choice == "Y"):
if "dependencies" in ps and dep in ps["dependencies"]:

View File

@@ -1,17 +1,12 @@
#!/bin/sh
set -e
# foo|bar|baz
skip_bins='cashierd'
toplevel="$(git rev-parse --show-toplevel)"
dirs="$(grep '"bin/' "$toplevel/Cargo.toml" | grep -v '#' | tr -d '", \t')"
find_packages() {
find bin -type f -name Cargo.toml | while read line; do
if echo "$line" | grep -Eq "$skip_bins"; then
continue
fi
bins=""
for i in $dirs; do
bins="$bins $(grep '^name = ' "$i/Cargo.toml" | cut -d' ' -f3 | tr -d '"')"
done
echo "$(basename "$(dirname "$line")")"
done
}
make BINS="$(find_packages | xargs)"
make BINS="$bins"