You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
534 B
24 lines
534 B
2 years ago
|
#!/bin/bash -
|
||
|
|
||
|
# Generate RPM provides automatically for nbdkit packages and filters.
|
||
|
# Copyright (C) 2009-2022 Red Hat Inc.
|
||
|
|
||
|
# To test:
|
||
|
# find /usr/lib64/nbdkit/plugins | ./nbdkit-find-provides VER REL
|
||
|
# find /usr/lib64/nbdkit/filters | ./nbdkit-find-provides VER REL
|
||
|
|
||
|
ver="$1"
|
||
|
rel="$2"
|
||
|
|
||
|
function process_file
|
||
|
{
|
||
|
if [[ $1 =~ /plugins/nbdkit-.*-plugin ]] ||
|
||
|
[[ $1 =~ /filters/nbdkit-.*-filter ]]; then
|
||
|
echo "Provides:" "$(basename $1 .so)" "=" "$ver-$rel"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
while read line; do
|
||
|
process_file "$line"
|
||
|
done
|