Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

#!/bin/bash

BLD_PARALLEL="4"
WORKSPACE=/export/home/admin/du2

STOP_ON_ERROR=0

while read COMP; do
  if [[ "" == "$COMP" ]]; then
    continue
  fi
  BLD_RESULT="/data/repo/du/$COMP"
  test -z "$COMP" && exit 1
  test -d ${BLD_RESULT} && rm -rf ${BLD_RESULT}

#  apt-get update && apt-get upgrade -y || exit 1
#  apt-get install -y build-essential illumos-dev dpkg-dev gmake || exit 1

  DEB_BUILD_OPTIONS="nocheck notest parallel=${BLD_PARALLEL}"
  export DEB_BUILD_OPTIONS

  test -d ${WORKSPACE}/$COMP && rm -rf ${WORKSPACE}/$COMP

  mkdir -p ${WORKSPACE}/$COMP
  cd ${WORKSPACE}/$COMP
  echo "====================== $COMP ======================"  | tee berror.log
  if [[ $STOP_ON_ERROR -eq 0 ]]; then
    apt-get build-dep -y $COMP >> berror.log || continue 2>&1
    apt-get source --compile $COMP >> berror.log || continue 2>&1
  else
    apt-get build-dep -y $COMP >> berror.log || exit 1 2>&1
    #DEB_BUILD_OPTIONS="nocheck notest parallel=4" apt-get source --compile $COMP || exit 1
    apt-get source --compile $COMP >> berror.log || exit 1 2>&1
  fi

  mkdir -p ${BLD_RESULT}
  cp -ax *.deb ${BLD_RESULT}/ || exit 1
  cp -ax *.changes ${BLD_RESULT}/ || exit 1
  cp -ax *.buildinfo ${BLD_RESULT}/ || exit 1
done < /data/repo/pkg/list_component

  • No labels