"Fossies" - the Fresh Open Source Software Archive

Member "pdns-auth-4.2.0/builder-support/post-build" (27 Aug 2019, 957 Bytes) of package /linux/misc/dns/pdns-auth-4.2.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 if [[ "${BUILDER_TARGET}" =~ ^doc.* ]]; then
    4   exit 0
    5 fi
    6 
    7 SRCDIR="${BUILDER_TMP}/${BUILDER_VERSION}/${BUILDER_TARGET}"
    8 DESTDIR="built_pkgs/"
    9 
   10 mkdir -p ${DESTDIR}
   11 
   12 # We need the GNU version of tar for --transform
   13 [ -z "$tar" ] && tar=`which gtar tar | grep '^/' | head -1`
   14 if ! $tar --version | grep -q GNU; then
   15     echo "ERROR: could not find GNU tar (as gtar or tar)"
   16     echo "On macOS: brew install gnu-tar"
   17     exit 1
   18 fi
   19 
   20 for prog in pdns-recursor dnsdist pdns; do
   21   if [ $(find ${SRCDIR}/dist -name "${prog}*" 2>/dev/null | wc -l) -ne 0 ]; then
   22     dst=${DESTDIR}/${prog}/${BUILDER_VERSION}
   23     mkdir -p ${dst}
   24     cp ${BUILDER_TMP}/${BUILDER_VERSION}/sdist/${prog}*.tar.bz2 ${dst}
   25     if [ "${prog}" = "pdns" ]; then
   26       rm -f ${dst}/pdns-recursor*
   27     fi
   28     tardirname=${prog}-${BUILDER_VERSION}-${BUILDER_TARGET}
   29     "$tar" -cjf ${dst}/${tardirname}.tar.bz2 --transform="s,.*/,${tardirname}/,g"  $(find ${SRCDIR} -type f)
   30   fi
   31 done