diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-02-15 22:11:56 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-02-15 22:11:56 -0500 |
commit | c8ad645d8827bdd9fedc19a8c67f22aa016f8290 (patch) | |
tree | 940bab200a80641ca0b6d748e8e3576970a8c290 /etc/jwstdp-snapshot/tasks/001-packages.sh | |
parent | 3190d616c3b61ba7f173dba1e46af701bbf2e34c (diff) | |
download | docker-pipeline-c8ad645d8827bdd9fedc19a8c67f22aa016f8290.tar.gz |
Refactor build/publish
Diffstat (limited to 'etc/jwstdp-snapshot/tasks/001-packages.sh')
-rwxr-xr-x | etc/jwstdp-snapshot/tasks/001-packages.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/etc/jwstdp-snapshot/tasks/001-packages.sh b/etc/jwstdp-snapshot/tasks/001-packages.sh new file mode 100755 index 0000000..e64fe06 --- /dev/null +++ b/etc/jwstdp-snapshot/tasks/001-packages.sh @@ -0,0 +1,38 @@ +#!/bin/bash +set -e +set -x + +sysconfdir="${TOOLCHAIN_BUILD}/etc/${PIPELINE}" +reqdir=${sysconfdir}/pkgs +blddir=builds + + +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 |