diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-12-04 16:22:46 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-12-04 16:22:46 -0500 |
commit | 2119eeef5d80ae1c14fdd1c45a9d81908ce14e3d (patch) | |
tree | a7b6dee647d7c0870885f6c17caddf2422a0281b /etc/hstdp-2018.3a/tasks/002-packages.sh | |
download | docker-pipeline-2119eeef5d80ae1c14fdd1c45a9d81908ce14e3d.tar.gz |
Initial commit
Diffstat (limited to 'etc/hstdp-2018.3a/tasks/002-packages.sh')
-rwxr-xr-x | etc/hstdp-2018.3a/tasks/002-packages.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/etc/hstdp-2018.3a/tasks/002-packages.sh b/etc/hstdp-2018.3a/tasks/002-packages.sh new file mode 100755 index 0000000..e948120 --- /dev/null +++ b/etc/hstdp-2018.3a/tasks/002-packages.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -e +set -x + +prefix="${TOOLCHAIN}" +sysconfdir="${TOOLCHAIN_BUILD}/etc/${PIPELINE}" +reqdir=${sysconfdir}/pkgs +blddir=builds + +export PATH="${prefix}/bin:${PATH}" +export CFLAGS="-I${prefix}/include" +export LDFLAGS="-L${prefix}/lib -Wl,-rpath=${prefix}/lib" +export PREFIX="${prefix}" + +function pre() +{ + if [[ ! -d ${reqdir} ]]; then + # Nothing there, but maybe that's on purpose. + exit 0 + fi + mkdir -p "${blddir}" + pushd ${blddir} &>/dev/null +} + +function build() +{ + pre + # Iterate over binary package build scripts + for req in ${reqdir}/* + do + chmod +x "${req}" + "${req}" + done + post +} + +function post() +{ + popd &>/dev/null + [[ -d ${blddir} ]] && rm -rf "${blddir}" +} + +build |