2017-01-04 23:19:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
source /etc/catalyst/catalyst.conf
|
|
|
|
|
2017-01-02 03:35:11 +00:00
|
|
|
MUSL_DIR="$( cd "$( dirname ${BASH_SOURCE[0]} )" && pwd )"
|
2017-01-04 23:19:47 +00:00
|
|
|
MY_DATE="$(date +%Y%m%d)"
|
|
|
|
|
|
|
|
# munge specfile for this run
|
2017-01-02 03:35:11 +00:00
|
|
|
cp "${MUSL_DIR}"/stage4-hardened-amd64.spec "${MUSL_DIR}"/stage4-hardened-amd64-configured.spec
|
|
|
|
sed -i "s|@REPO_DIR@|${MUSL_DIR}|g" "${MUSL_DIR}"/stage4-hardened-amd64-configured.spec
|
2017-01-04 23:19:47 +00:00
|
|
|
sed -i "s|MY_DATE|${MY_DATE}|g" "${MUSL_DIR}"/stage4-hardened-amd64-configured.spec
|
2017-01-02 03:35:11 +00:00
|
|
|
|
2017-01-04 23:19:47 +00:00
|
|
|
# catalyst stuff
|
2017-01-02 03:35:11 +00:00
|
|
|
catalyst -f "${MUSL_DIR}"/stage4-hardened-amd64-configured.spec | tee -a "${MUSL_DIR}"/zzz.log
|
2017-01-04 23:19:47 +00:00
|
|
|
|
|
|
|
# update link, rm -f returns 0 if file isn't there yet
|
2019-05-24 03:50:12 +00:00
|
|
|
rm -f "${storedir}/builds/musl/hardened/amd64/stage4-amd64-musl-hardened.tar.xz"
|
|
|
|
ln -s "${storedir}/builds/musl/hardened/amd64/stage4-amd64-musl-hardened-${MY_DATE}.tar.xz" "${storedir}/builds/musl/hardened/amd64/stage4-amd64-musl-hardened.tar.xz"
|
2017-01-04 23:19:47 +00:00
|
|
|
|
|
|
|
# remove old specfile
|
|
|
|
rm "${MUSL_DIR}"/stage4-hardened-amd64-configured.spec
|