undici-sources: check for missing dependencies

[skip changelog]
This commit is contained in:
Jan Staněk 2023-11-15 11:14:26 +01:00
parent 9365e7e715
commit f756dffc05
No known key found for this signature in database
GPG Key ID: 2972F2037B243B6D

View File

@ -1,6 +1,16 @@
#!/bin/sh #!/bin/sh
# deps: curl rpm npm nodejs-packaging-bundler
set -e set -e
check_deps() {
deps_ec=0
for dep in "$@"; do
command -v "$dep" >/dev/null || {
printf 'Missing dependency: %s\n' "$dep" >&2
deps_ec="$((deps_ec + 1))"
}
done
return "$deps_ec"
}
check_deps curl rpm npm nodejs-packaging-bundler
UNDICI_VERSION="$(rpm --specfile nodejs-undici.spec --qf '%{VERSION}\n')"; readonly UNDICI_VERSION UNDICI_VERSION="$(rpm --specfile nodejs-undici.spec --qf '%{VERSION}\n')"; readonly UNDICI_VERSION