File: nd_gitbuild

package info (click to toggle)
neurodebian 0.43.0
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,960 kB
  • sloc: sh: 2,419; python: 1,978; perl: 412; makefile: 207; javascript: 63
file content (42 lines) | stat: -rwxr-xr-x 968 bytes parent folder | download | duplicates (7)
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
#!/bin/bash

family=$1
dist=$2

set -e

if [ -z "$family" ]; then
  echo "You need to provide a distribution family ('debian', 'ubuntu'); prefix with 'nd+' to enable the NeuroDebian repository."
  exit 1
fi

if [ -z "$dist" ]; then
  echo "You need to provide a distribution codename (e.g. 'lenny', 'squeeze')."
  exit 1
fi

. /etc/neurodebian/cmdsettings.sh

# common options
opts="--distribution $dist --aptcache $aptcache --buildplace $buildplace"

if [ -n "$3" ]; then
  arch=$3
else
  if [ "$(grep '^Architecture' debian/control | awk '{ print $2 }')" = "all" ]; then
    echo "Arch 'all' package detected -- using amd64 system to build it"
    arch="amd64"
  else
    arch="i386 amd64"
  fi
fi


for a in $arch; do
  echo "Building for $family $dist $a ..."
  pdebuild --pbuilder cowbuilder --debbuildopts "-us -uc -i" \
           --buildresult .. \
           -- \
           --basepath ${cowbuilderroot}/cow/${family}-${dist}-${a}.cow \
           $opts
done