-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c6b2c31
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
CHECKOUT="${1:-1.4.18}" | ||
|
||
docker build -t tnef-builder docker | ||
|
||
mkdir -p bin | ||
|
||
docker run -it --rm --name tnef-builder -v "$(pwd)/bin":/dist -- tnef-builder "${CHECKOUT}" "/dist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM debian:buster | ||
|
||
RUN apt-get update ; apt-get install -y --no-install-suggests packaging-dev | ||
|
||
ADD ./entrypoint.sh /bin/entrypoint.sh | ||
|
||
WORKDIR /code | ||
|
||
ENTRYPOINT ["/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
CHECKOUT="${1:-}" | ||
DESTINATION="${2:-.}" | ||
|
||
if [[ "$(ls -Uba1 | wc -l)" -le 2 ]]; then | ||
echo "Cloning tnef repository" | ||
git clone -q -- https://github.com/verdammelt/tnef /code | ||
if [[ -n "${CHECKOUT}" ]]; then | ||
echo "Checking out ${CHECKOUT}" | ||
git checkout -q "${CHECKOUT}" | ||
fi | ||
fi | ||
|
||
autoreconf | ||
./configure | ||
make --quiet check | ||
|
||
if [[ -d "${DESTINATION}" ]]; then | ||
DESTFILE="${DESTINATION}/tnef-$(git describe --dirty --tags)-$(lsb_release -sc)-$(dpkg --print-architecture)" | ||
echo "Result in $(readlink -f ${DESTFILE})" | ||
cp -- src/tnef "${DESTFILE}" | ||
fi |