summaryrefslogtreecommitdiffstats
path: root/Tools/portbuild/scripts/makerestr
blob: 4fe8ec94470365d42a52e88beb6927cf50fd8671 (plain)
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
#!/bin/sh

usage () {
  echo "usage: makerestr arch branch buildid"
  exit 1
}
if [ $# -ne 3 ]; then
  usage
fi

# configurable variables
pb=/var/portbuild
arch=$1
branch=$2
buildid=$3
shift

. ${pb}/${arch}/portbuild.conf
. ${pb}/scripts/buildenv

builddir=${pb}/${arch}/${branch}/builds/${buildid}

buildenv ${pb} ${arch} ${branch} ${builddir}

duds=${builddir}/duds

unset DISPLAY

export __MAKE_SHELL=/rescue/sh
export PACKAGE_BUILDING=1
export LOCALBASE=/nonexistentlocal
export X11BASE=/nonexistentx
export LINUXBASE=/nonexistentlinux
export PKG_DBDIR=/nonexistentpkg
export PORT_DBDIR=/nonexistentport

cd ${PORTSDIR}
make -j4 ECHO_MSG=true clean-restricted-list \
  | sed -e "s./usr/ports/packages/.${builddir}/packages/.g" \
  -e "s./usr/ports/.${builddir}/ports/.g" \
  > ${builddir}/restricted.sh
OpenPOWER on IntegriCloud