-
Notifications
You must be signed in to change notification settings - Fork 1
/
check_packages
executable file
·62 lines (57 loc) · 1.58 KB
/
check_packages
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
#
# A script to help manage the openSUSE:Tumbleweed project
# (C) 2010-2011 Greg Kroah-Hartman <gregkh@suse.de>
# Released under the GPL v2.
#
# This script reads the file 'package_list' and runs 'check_package'
# on all of the packages listed in it.
#
# You can specify a file that lists the packages on the command line
# if you do not want to check the default list (which is 'package_list')
#
# Any questions/comments/patches are gladly welcome, just send to:
# Greg Kroah-Hartman <gregkh@suse.de>
#
# Options for specifying repos to check against:
# --kde : openSUSE:Tumbleweed:KDE
# --gnome : openSUSE:Tumbleweed:GNOME
# --xfce: openSUSE:Tumbleweed:xfce
# --testing : openSUSE:Tumbleweed:Testing
# --repo : You pick the repo to use
# Default package list filename. Override it on the command line
# if you want something else
FILE="package_list"
# Default repo to use if none is specified
REPO="openSUSE:Tumbleweed"
while [ "$1" != "" ]; do
case $1 in
--kde ) REPO="openSUSE:Tumbleweed:KDE"
;;
--gnome ) REPO="openSUSE:Tumbleweed:GNOME"
;;
--xfce ) REPO="openSUSE:Tumbleweed:xfce"
;;
--testing ) REPO="openSUSE:Tumbleweed:Testing"
;;
--repo ) shift
REPO=$1
;;
* ) FILE=$1
;;
esac
shift
done
echo "# reading list of packages from file '$FILE' for repo '$REPO'"
while read line
do
# remove lines that start with a # and all whitespace in the line
line=`echo $line | sed -e '/^#/d' | sed -e 's/^[ \t]*//;s/[ \t]*$//'`
if [ "${line}" = "STOP_NOW" ] ; then
exit 1
fi
if [ "$line" != "" ]
then
./check_package --repo $REPO $line
fi
done < $FILE