File: build-deb

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 482,632 kB
  • sloc: cpp: 2,127,216; python: 294,089; makefile: 51,946; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (61 lines) | stat: -rwxr-xr-x 1,503 bytes parent folder | download | duplicates (4)
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
#!/bin/bash
#----------------------------------------------------------------------

set -o errexit
#set -o xtrace

host=$1
chRootRoot=$2
chRootName=$3


if [ $buildansi = yes ]; then
    CHARTYPE=both
else
    CHARTYPE=unicode
fi


function TestOnline {
    local host=$1
    local message=$2

    if ping -q -c1 -w1 $host > /dev/null; then
	return 0
    else
	return 1
    fi
}

#user=root
user=robind

if [ $skipdeb != yes ]; then
    # We use a chroot environment on the build machine for the debian
    # builds, so this build is pretty simple.  Just copy the tarball
    # and a build script to the build machine, and then run
    # do-build-deb in the chroot.

    if TestOnline $host; then
    
	echo "The $host machine is online, build continuing..."

	echo "Copying source files and build script..."
	ssh $user@$host "mkdir -p $chRootRoot/$LINUX_BUILD && rm -rf $chRootRoot/$LINUX_BUILD/*"
	scp $STAGING_DIR/wxwidgets*.orig.tar.gz distrib/all/do-build-deb \
            $user@$host:$chRootRoot/$LINUX_BUILD
    
	ssh $user@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"./do-build-deb $VERSION $VER2 $CHARTYPE\""

	echo "Fetching the results..."
	mkdir -p $STAGING_DIR/$chRootName
	ssh $user@$host "rm $chRootRoot/$LINUX_BUILD/do-build-deb"
	scp "$user@$host:$chRootRoot/$LINUX_BUILD/*"  $STAGING_DIR/$chRootName
	ssh $user@$host "rm $chRootRoot/$LINUX_BUILD/*"
	echo "Done!"
    else
	echo "The $host machine is **OFFLINE**, skipping the binary DEB build."
	exit 0
    fi
fi