File tree 2 files changed +58
-1
lines changed
2 files changed +58
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ BASH_SCRIPTS = \
9
9
aur/review \
10
10
package/parse-submodules \
11
11
package/pkgsearch \
12
- package/rebuild-todo
12
+ package/rebuild-todo \
13
+ package/pkggrep
13
14
14
15
PYTHON_SCRIPTS = \
15
16
package/staging2testing \
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # SPDX-License-Identifier: GPL-2.0
4
+
5
+ set -eou pipefail
6
+
7
+ PROGNAME=" ${BASH_SOURCE[0]##*/ } "
8
+
9
+ usage () {
10
+ cat << - _EOF_
11
+ Usage: ${PROGNAME} [OPTIONS] expression
12
+
13
+ Does a full search on all files currently in the repository.
14
+ This is useful if one wants to search for a symbol instead of a soname.
15
+ For sonames please use 'sogrep'.
16
+
17
+ OPTIONS
18
+ -h, --help Show this help text
19
+
20
+ Examples:
21
+ $ ${PROGNAME} _ZN3fmt3v116detail10locale_refC1ISt6localeEERKT_
22
+ _EOF_
23
+ }
24
+
25
+ if ! (( ${# } )) ; then
26
+ usage
27
+ exit 0
28
+ fi
29
+
30
+ SEARCH_EXPRESSION=" "
31
+ SEARCH_HOST=" build.archlinux.org"
32
+
33
+ while (( ${# } )) ; do
34
+ key=" ${1} "
35
+ case ${key} in
36
+ -h|--help)
37
+ usage
38
+ exit 0
39
+ ;;
40
+ --)
41
+ shift
42
+ break
43
+ ;;
44
+ -* )
45
+ echo " invalid argument: $key "
46
+ usage
47
+ exit 1
48
+ ;;
49
+ * )
50
+ SEARCH_EXPRESSION=" ${key} "
51
+ ;;
52
+ esac
53
+ shift
54
+ done
55
+
56
+ ssh " ${SEARCH_HOST} " " parallel \" rg --files-with-matches --search-zip -- '${SEARCH_EXPRESSION} ' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.zst"
You can’t perform that action at this time.
0 commit comments