Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagebash
#!/bin/bash

BLD_PARALLEL="24"
WORKDIR=/export/home/admin;
WORKSPACE=${WORKDIR}/du2;

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
  apt-get build-dep -y $COMP || exit 1
  #DEB_BUILD_OPTIONS="nocheck notest parallel=4" apt-get source --compile $COMP || exit 1
  apt-get source --compile $COMP || exit 1

  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