blob: 72bb497aa620680f6f8b6bb91840b8730c4b0ffe (
plain)
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
63
64
65
66
67
|
#!/bin/sh
set -e
if [ -z "${1}" ] || [ -z "${2}" ]
then
echo "Usage: ${0} DISTRIBUTION PACKAGE"
exit 1
fi
CATEGORY="packages"
DISTRIBUTION="${1}"
shift 1
PACKAGES="${@}"
SSH_OPTIONS=""
case "${DISTRIBUTION}" in
*-extras)
ORIGIN="progress-linux"
BRANCH="progress-linux"
SSH_OPTIONS="-o ControlMaster=no"
;;
*-security)
ORIGIN="debian-security"
BRANCH="progress-linux"
SSH_OPTIONS="-o ControlMaster=no"
;;
*-updates)
ORIGIN="debian-updates"
BRANCH="progress-linux"
SSH_OPTIONS="-o ControlMaster=no"
;;
*-backports)
ORIGIN="debian-backports"
BRANCH="progress-linux"
SSH_OPTIONS="-o ControlMaster=no"
;;
daniel*)
CATEGORY="users/daniel.baumann/debian/packages"
DISTRIBUTION=""
ORIGIN="debian"
BRANCH="debian"
SSH_OPTIONS="-i ~/.ssh/keys/daniel.baumann@progress-linux.org -o ControlMaster=no"
;;
*)
ORIGIN="debian"
BRANCH="progress-linux"
SSH_OPTIONS="-o ControlMaster=no"
;;
esac
for PACKAGE in ${PACKAGES}
do
REPOSITORY="$(echo ${CATEGORY}/${DISTRIBUTION}/${PACKAGE} | sed -e 's|//|/|g')"
ssh ${SSH_OPTIONS} git@git.progress-linux.org create ${REPOSITORY}
ssh ${SSH_OPTIONS} git@git.progress-linux.org desc ${REPOSITORY} ${ORIGIN}: ${PACKAGE}
ssh ${SSH_OPTIONS} git@git.progress-linux.org symbolic-ref ${REPOSITORY} HEAD refs/heads/${BRANCH}
done
|