]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/build-deb
fixed wxVsnprintf() to write as much as it can if the output buffer is too short
[wxWidgets.git] / wxPython / distrib / all / build-deb
1 #!/bin/bash
2 #----------------------------------------------------------------------
3
4 set -o errexit
5 #set -o xtrace
6
7 host=$1
8 chRootRoot=$2
9 chRootName=$3
10
11
12 function TestOnline {
13 local host=$1
14 local message=$2
15
16 if ping -q -c1 -w1 $host > /dev/null; then
17 return 0
18 else
19 return 1
20 fi
21 }
22
23
24
25 if [ $skipdeb != yes ]; then
26 # We use a chroot environment on the build machine for the debian
27 # builds, so this build is pretty simple. Just copy the tarball
28 # and a build script to the build machine, and then run
29 # do-build-deb in the chroot.
30
31 if TestOnline $host; then
32
33 echo "The $host machine is online, build continuing..."
34
35 echo "Copying source files and build script..."
36 ssh root@$host "mkdir -p $chRootRoot/$LINUX_BUILD && rm -rf $chRootRoot/$LINUX_BUILD/*"
37 scp $STAGING_DIR/wxPython-src* distrib/all/do-build-deb \
38 root@$host:$chRootRoot/$LINUX_BUILD
39
40 ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"./do-build-deb $VERSION $VER2\""
41
42 echo "Fetching the results..."
43 mkdir -p $STAGING_DIR/$chRootName
44 ssh root@$host "rm $chRootRoot/$LINUX_BUILD/do-build-deb"
45 scp "root@$host:$chRootRoot/$LINUX_BUILD/*" $STAGING_DIR/$chRootName
46 ssh root@$host "rm $chRootRoot/$LINUX_BUILD/*"
47 echo "Done!"
48 else
49 echo "The $host machine is **OFFLINE**, skipping the binary DEB build."
50 exit 0
51 fi
52 fi
53