forked from ceph/ceph-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign_debs.sh
executable file
·39 lines (29 loc) · 897 Bytes
/
sign_debs.sh
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
#!/bin/bash -x
set -e
usage() {
echo "usage: $0 releasedir vers key [filetypetosign] [resultdir]"
}
releasedir=$1
cephvers=$2
keyid=$3
what=$4
resultdir=$5
[ -z "$what" ] && what="dsc changes"
[ -z "$releasedir" ] && echo specify releasedir && usage && exit 1
[ -z "$cephvers" ] && echo specify version && usage && exit 1
[ ! -d "$releasedir/$cephvers" ] && echo missing $releasedir/$cephvers && usage && exit 1
if [ -n "$resultdir" ] ; then
resultdir=$releasedir/$cephvers/$resultdir
[ ! -d "$resultdir" ] && echo missing $resultdir && usage && exit 1
fi
[ -z "$keyid" ] && echo specify keyid && exit 1
echo version $cephvers
echo "signing $releasedir/$cephvers/*.$w"
for w in $what
do
if [ -n "$resultdir" -a -d "$resultdir" ] ; then
( cd $resultdir ; yes | debsign -k$keyid *.$w )
else
yes | debsign -k$keyid $releasedir/$cephvers/*.$w
fi
done