summaryrefslogtreecommitdiffstats
path: root/bin/d-i_build.sh
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-06-10 09:00:04 +0200
committerHolger Levsen <holger@layer-acht.org>2016-06-10 10:24:58 +0200
commit55178f23b86864b033472f590e6f28e9f66b2ed3 (patch)
tree52ccb9aae76e3278046af5e04ae6b24b9f45caab /bin/d-i_build.sh
parentdbb4f0ff4994030828ca7ee901ec80e9a2ddce26 (diff)
downloadjenkins.debian.net-55178f23b86864b033472f590e6f28e9f66b2ed3.tar.xz
d-i: preserve udebs built in pu/ branches
Diffstat (limited to 'bin/d-i_build.sh')
-rwxr-xr-xbin/d-i_build.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/d-i_build.sh b/bin/d-i_build.sh
index 657173ae..8465d797 100755
--- a/bin/d-i_build.sh
+++ b/bin/d-i_build.sh
@@ -79,6 +79,18 @@ pdebuild_package() {
sudo dcmd rm /var/cache/pbuilder/result/${SOURCE}_*changes
}
+preserve_pu_udebs() {
+ #
+ # Check is we're in a pu/* branch
+ #
+ expr "$GIT_BRANCH" : 'origin/pu/' >/dev/null || return 0
+
+ BRANCH_DIR="/srv/udebs/${GIT_BRANCH#origin/pu/}"
+ mkdir -p $PU_BRANCH_DIR
+
+ cp $WORKSPACE/../*.udeb $PU_BRANCH_DIR
+}
+
clean_workspace
#
# if $1 is not given, build the package normally,
@@ -86,6 +98,7 @@ clean_workspace
#
if [ "$1" = "" ] ; then
pdebuild_package
+ preserve_pu_udebs
else
echo do something else ; exit 1
fi