1 |
gordonr |
1.1 |
#!/bin/sh |
2 |
|
|
|
3 |
gordonr |
1.6 |
UNSIGNED=$(rpm -K $@ | grep 'md5 OK' | sed -e 's/:.*//') |
4 |
|
|
|
5 |
|
|
if [ -n "$UNSIGNED" ] |
6 |
|
|
then |
7 |
|
|
echo "The following RPMs are not signed:" |
8 |
|
|
echo $UNSIGNED |
9 |
|
|
echo "Please sign them now" |
10 |
|
|
|
11 |
|
|
rpm --addsign $UNSIGNED || exit 1 |
12 |
|
|
fi |
13 |
|
|
|
14 |
gordonr |
1.3 |
for file in $@ |
15 |
gordonr |
1.1 |
do |
16 |
|
|
arch=$(basename $file .rpm | sed -e 's/.*\.//') |
17 |
|
|
|
18 |
|
|
case $arch in |
19 |
|
|
src) TARGET=/builds/rpms/SRPMS ;; |
20 |
|
|
|
21 |
|
|
*) TARGET=/builds/rpms/RPMS/$arch ;; |
22 |
|
|
esac |
23 |
|
|
|
24 |
|
|
if [ -f $TARGET/$file ] |
25 |
|
|
then |
26 |
|
|
echo "$TARGET/$file exists" |
27 |
|
|
continue |
28 |
|
|
else |
29 |
|
|
[ -d $TARGET ] && mkdir -p $TARGET |
30 |
|
|
|
31 |
|
|
# XXX - FIXME - Force signing of RPMs before release |
32 |
|
|
rpm -K $file |
33 |
gordonr |
1.5 |
cp -a $file $TARGET/$(basename $file) |
34 |
gordonr |
1.1 |
fi |
35 |
|
|
done |