-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into PGP_keys_rebuild-todo
- Loading branch information
Showing
3 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
set -eou pipefail | ||
|
||
PROGNAME="${BASH_SOURCE[0]##*/}" | ||
|
||
usage() { | ||
cat <<- _EOF_ | ||
Usage: ${PROGNAME} [OPTIONS] expression | ||
Does a full search on all files currently in the repository. | ||
This is useful if one wants to search for a symbol instead of a soname. | ||
For sonames please use 'sogrep'. | ||
OPTIONS | ||
-h, --help Show this help text | ||
Examples: | ||
$ ${PROGNAME} _ZN3fmt3v116detail10locale_refC1ISt6localeEERKT_ | ||
_EOF_ | ||
} | ||
|
||
if ! ((${#})); then | ||
usage | ||
exit 0 | ||
fi | ||
|
||
SEARCH_EXPRESSION="" | ||
SEARCH_HOST="build.archlinux.org" | ||
|
||
while ((${#})); do | ||
key="${1}" | ||
case ${key} in | ||
-h|--help) | ||
usage | ||
exit 0 | ||
;; | ||
--) | ||
shift | ||
break | ||
;; | ||
-*) | ||
echo "invalid argument: $key" | ||
usage | ||
exit 1 | ||
;; | ||
*) | ||
SEARCH_EXPRESSION="${key}" | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
ssh "${SEARCH_HOST}" "parallel \"rg --files-with-matches --search-zip -- '${SEARCH_EXPRESSION}' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.zst" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters