##// END OF EJS Templates
dockerdeb: pass the rest of the args to the builder script...
Sean Farley -
r29007:78074575 stable
parent child Browse files
Show More
@@ -1,35 +1,35
1 #!/bin/bash -eu
1 #!/bin/bash -eu
2
2
3 . $(dirname $0)/dockerlib.sh
3 . $(dirname $0)/dockerlib.sh
4 . $(dirname $0)/packagelib.sh
4 . $(dirname $0)/packagelib.sh
5
5
6 BUILDDIR=$(dirname $0)
6 BUILDDIR=$(dirname $0)
7 export ROOTDIR=$(cd $BUILDDIR/.. > /dev/null; pwd)
7 export ROOTDIR=$(cd $BUILDDIR/.. > /dev/null; pwd)
8
8
9 checkdocker
9 checkdocker
10
10
11 DISTID="$1"
11 DISTID="$1"
12 CODENAME="$2"
12 CODENAME="$2"
13 PLATFORM="$1-$2"
13 PLATFORM="$1-$2"
14 shift; shift # extra params are passed to build process
14 shift; shift # extra params are passed to build process
15
15
16 OUTPUTDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM}
16 OUTPUTDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM}
17
17
18 initcontainer $PLATFORM
18 initcontainer $PLATFORM
19
19
20 # debuild only appears to be able to save built debs etc to .., so we
20 # debuild only appears to be able to save built debs etc to .., so we
21 # have to share the .. of the current directory with the docker
21 # have to share the .. of the current directory with the docker
22 # container and hope it's writable. Whee.
22 # container and hope it's writable. Whee.
23 dn=$(basename $PWD)
23 dn=$(basename $PWD)
24
24
25 if [ $(uname) = "Darwin" ] ; then
25 if [ $(uname) = "Darwin" ] ; then
26 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
26 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
27 sh -c "cd /mnt/$dn && make clean && make local"
27 sh -c "cd /mnt/$dn && make clean && make local"
28 fi
28 fi
29 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
29 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
30 sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME"
30 sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME $@"
31 contrib/builddeb --cleanup --distid $DISTID --codename $CODENAME
31 contrib/builddeb --cleanup --distid $DISTID --codename $CODENAME
32 if [ $(uname) = "Darwin" ] ; then
32 if [ $(uname) = "Darwin" ] ; then
33 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
33 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
34 sh -c "cd /mnt/$dn && make clean"
34 sh -c "cd /mnt/$dn && make clean"
35 fi
35 fi
General Comments 0
You need to be logged in to leave comments. Login now