Skip to content

Commit 66cb2c2

Browse files
committed
genaffect: generates a list of affected packages for topic pull requests
1 parent 4b717c8 commit 66cb2c2

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

genaffect/COPYING

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2+
Version 2, December 2004
3+
4+
Copyright (C) 2004 Sam Hocevar <[email protected]>
5+
6+
Everyone is permitted to copy and distribute verbatim or modified
7+
copies of this license document, and changing it is allowed as long
8+
as the name is changed.
9+
10+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12+
13+
0. You just DO WHAT THE FUCK YOU WANT TO.
14+
15+

genaffect/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
genaffect
2+
=========
3+
4+
Generates a list of affected packages for topic pull requests.
5+
6+
```
7+
Usage:
8+
9+
genaffect PACKAGE_GROUP
10+
11+
- PACKAGE_GROUP: Path to the list of packages to generate affected list from.
12+
(Example: TREE/groups/plasma)
13+
```

genaffect/genaffect

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
_help_message() {
4+
printf "\
5+
Generates a list of affected packages for topic pull requests.
6+
7+
Usage:
8+
9+
genaffect PACKAGE_GROUP
10+
11+
- PACKAGE_GROUP: Path to the list of packages to generate affected list from.
12+
(Example: TREE/groups/plasma)
13+
14+
"
15+
}
16+
17+
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
18+
_help_message
19+
exit 0
20+
fi
21+
22+
if [ -z "$1" ]; then
23+
echo -e "[!!!] Please specify a package group.\n"
24+
_help_message
25+
exit 1
26+
fi
27+
28+
for i in `cat $1`; do
29+
source $i/spec
30+
printf -- "- \`$(echo $i | cut -f2 -d/)\` v${VER}-${REL:-0}\n"
31+
done | sort

0 commit comments

Comments
 (0)