Skip to content

Commit

Permalink
1.4.18
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinedeschenes committed Sep 2, 2020
0 parents commit c6b2c31
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
9 changes: 9 additions & 0 deletions compile.sh
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"
9 changes: 9 additions & 0 deletions docker/Dockerfile
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"]
25 changes: 25 additions & 0 deletions docker/entrypoint.sh
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

0 comments on commit c6b2c31

Please sign in to comment.