forked from ceph/ceph-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush_to_deb_repo.sh
executable file
·42 lines (33 loc) · 1.1 KB
/
push_to_deb_repo.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
39
40
41
42
#!/bin/bash
set -e
releasedir=$1
repo=$2
cephvers=$3
component=$4
usage() {
echo "usage: $0 releasedir repodir version component"
}
[ -z "$releasedir" ] && echo specify releasedir && usage && exit 1
[ -z "$repo" ] && echo specify reprepro dir && usage && exit 1
[ -z "$cephvers" ] && echo specify version && usage && exit 1
[ ! -d "$releasedir/$cephvers" ] && echo missing $releasedir/$cephvers && usage && exit 1
[ -z "$component" ] && echo "must specify repo component" && usage && exit 1
bindir=`dirname $0`
echo version $cephvers
echo component $component
[ -z "$dists" ] && dists=`cat $releasedir/$cephvers/debian_dists`
dvers=`cat $releasedir/$cephvers/debian_version`
echo deb vers $dvers
echo dists $dists
for dist in $dists
do
bpvers=`$bindir/gen_debian_version.sh $dvers $dist`
echo dist $dist
echo vers $bpvers
#for f in $releasedir/$cephvers/*${bpvers}_*.changes
for f in `find $releasedir/$cephvers/ -name "*${bpvers}_*.changes"`
do
echo file $f
reprepro --ask-passphrase -b $repo -C $component --ignore=undefinedtarget --ignore=wrongdistribution include $dist $f
done
done