mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 00:16:59 +02:00
These tools I found useful when I had to investigate why report generation failed. Since report generation failed, I had no reports about ebuild diffs or package occurences. The new scripts, `diff_pkg.sh` and `occurences.sh`, allowed me to get these reports for the troublesome package.
44 lines
839 B
Bash
Executable File
44 lines
839 B
Bash
Executable File
#!/bin/bash
|
|
|
|
##
|
|
## Print all the places in the scripts repository where the given
|
|
## package is mentioned. It's sort of like grep, but a bit smarter and
|
|
## with a slightly better output.
|
|
##
|
|
## Parameters:
|
|
## -h: this help
|
|
##
|
|
## Positional:
|
|
## 1: scripts repo
|
|
## 2: package name
|
|
##
|
|
|
|
set -euo pipefail
|
|
|
|
source "$(dirname "${BASH_SOURCE[0]}")/impl/pkg_auto_lib.sh"
|
|
|
|
while [[ ${#} -gt 0 ]]; do
|
|
case ${1} in
|
|
-h)
|
|
print_help
|
|
exit 0
|
|
;;
|
|
--)
|
|
shift
|
|
break
|
|
;;
|
|
-*)
|
|
fail "unknown flag '${1}'"
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [[ ${#} -ne 2 ]]; then
|
|
fail 'Expected two positional parameters: a path to scripts repository and a package name'
|
|
fi
|
|
|
|
generate_mention_report_for_package "${1}" "${2}"
|