File: build_remotes.sh

package info (click to toggle)
portsentry 2.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,396 kB
  • sloc: ansic: 6,473; sh: 916; perl: 18; makefile: 5
file content (20 lines) | stat: -rwxr-xr-x 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

[ -z "$BUILD_TYPE" ] && BUILD_TYPE="debug"
if [ -n "$1" ]; then
  REMOTE_HOSTS="$1"
else
  REMOTE_HOSTS="deb-portsentry netbsd freebsd openbsd"
fi

for host in $REMOTE_HOSTS; do
  echo "Building on $host"
  ssh $host "rm -rf /tmp/portsentry"
  rsync -az -e ssh ../portsentry $host:/tmp/
  ssh $host "cd /tmp/portsentry && ./build.sh clean && ./build.sh $BUILD_TYPE"
  if [ $? -ne 0 ]; then
    echo "ERROR: Failed to build on $host"
    exit 1
  fi
  echo
done