Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
VERSION="1.0.0"
SHA="4d3727c"
BUILD="$SHA-slack1"
set -e -x
DIRNAME="$(cd "$(dirname "$0")" && pwd)"
OLDESTPWD="$PWD"
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
curl -LO "https://github.com/duosecurity/duo_openvpn/tarball/$SHA"
/bin/tar -xvf "$SHA"
cd "duosecurity-duo_openvpn-$SHA"
make
make install DESTDIR="$PWD/rootfs"
fakeroot fpm -C "$PWD/rootfs" \
-m "Nate Brown <nate@slack-corp.com>" \
-n "duo-vpn" -v "$VERSION-$BUILD" \
-p "$OLDESTPWD/duo-vpn_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" \
"opt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.