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 |
slords |
1.7 |
if [ -x $HOME/bin/signrpm ] |
8 |
|
|
then |
9 |
|
|
for rpm in $UNSIGNED |
10 |
|
|
do |
11 |
|
|
$HOME/bin/signrpm $rpm > /dev/null |
12 |
|
|
done |
13 |
|
|
else |
14 |
|
|
echo "The following RPMs are not signed:" |
15 |
|
|
echo $UNSIGNED |
16 |
|
|
echo "Please sign them now" |
17 |
gordonr |
1.6 |
|
18 |
slords |
1.7 |
rpm --addsign $UNSIGNED |
19 |
|
|
fi |
20 |
|
|
|
21 |
|
|
UNSIGNED=$(rpm -K $@ | grep 'md5 OK' | sed -e 's/:.*//') |
22 |
|
|
[ -n "$UNSIGNED" ] && exit 1 |
23 |
gordonr |
1.6 |
fi |
24 |
|
|
|
25 |
gordonr |
1.3 |
for file in $@ |
26 |
gordonr |
1.1 |
do |
27 |
|
|
arch=$(basename $file .rpm | sed -e 's/.*\.//') |
28 |
|
|
|
29 |
|
|
case $arch in |
30 |
|
|
src) TARGET=/builds/rpms/SRPMS ;; |
31 |
|
|
|
32 |
|
|
*) TARGET=/builds/rpms/RPMS/$arch ;; |
33 |
|
|
esac |
34 |
|
|
|
35 |
slords |
1.7 |
if [ -f $TARGET/$(basename $file) ] |
36 |
gordonr |
1.1 |
then |
37 |
slords |
1.7 |
echo "$TARGET/$(basename $file) exists" |
38 |
gordonr |
1.1 |
continue |
39 |
|
|
else |
40 |
|
|
[ -d $TARGET ] && mkdir -p $TARGET |
41 |
slords |
1.7 |
cp --preserve=timestamps $file $TARGET/$(basename $file) |
42 |
gordonr |
1.1 |
fi |
43 |
|
|
done |