Skip to content

Instantly share code, notes, and snippets.

@dopey
Created February 26, 2015 02:24
Show Gist options
  • Save dopey/a617e48c06165780cf42 to your computer and use it in GitHub Desktop.
Save dopey/a617e48c06165780cf42 to your computer and use it in GitHub Desktop.
Ngrok deb
# Run this in a path you don't care about, things may get deleted!
VERSION="1.0"
BUILD="betable1"
set -e -x
ORIGPWD="$(pwd)"
TMP="$(mktemp -d)"
cd $TMP
trap "rm -rf \"$TMP\"" EXIT INT QUIT TERM
git clone https://github.com/inconshreveable/ngrok
git co 76ef59fe5d334fc989e8409948d0c357b2750147
cd ngrok
make
mkdir "rootfs"
mkdir "rootfs/etc"
mkdir "rootfs/usr"
cp -r "bin" "rootfs/usr/bin"
rm -f "$ORIGPWD/ngrok_${VERSION}-${BUILD}_amd64.deb"
fakeroot fpm -C "rootfs" \
-m "Max Furman <max@betable.com>" \
-n "ngrok" -v "$VERSION-$BUILD" \
-p "$ORIGPWD/ngrok_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" \
"etc" "usr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment