github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/tini/ci/util/rpmbuild (about)

     1  #!/bin/bash
     2  # Wrapper for rpm build that first removes files that should be in there
     3  # We need this for compatibility with CMake <= 2.8.10 (which is the only version we have in Travis)
     4  # See: http://www.cmake.org/pipermail/cmake-commits/2013-April/014818.html
     5  set -o nounset
     6  set -o errexit
     7  set -o pipefail
     8  
     9  # Remove PATH hack so we can find the real rpmbuild
    10  export PATH="${REAL_PATH}"
    11  
    12  echo "Using local rpmbuild"
    13  
    14  specFile="${!#}"  # Last argument
    15  
    16  for removeLine in '"/usr"' '"/usr/bin"'; do
    17    sed -i "s|${removeLine}||g" "${specFile}"
    18  done
    19  
    20  # Passthrough to rpmbuild
    21  exec rpmbuild "${@}"