Skip to content

Instantly share code, notes, and snippets.

@nbrownus
Created May 24, 2016 20:54
Show Gist options
  • Save nbrownus/b8da3cb8405ea34ed4ca8a28ce34cc25 to your computer and use it in GitHub Desktop.
Save nbrownus/b8da3cb8405ea34ed4ca8a28ce34cc25 to your computer and use it in GitHub Desktop.
#!/bin/sh
VERSION="2.31"
BUILD="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/grondo/pdsh/archive/pdsh-${VERSION}.tar.gz"
tar -xvf "pdsh-${VERSION}.tar.gz"
cd "pdsh-pdsh-${VERSION}"
./configure --with-ssh --with-dshgroups --without-rsh --with-rcmd-rank-list="ssh"
make
mkdir -p "$PWD/rootfs/usr/bin"
mv "$PWD/src/pdsh/pdsh" "$PWD/rootfs/usr/bin"
fakeroot fpm -C "$PWD/rootfs" \
-m "Nate Brown <nate@slack-corp.com>" \
-n "pdsh" -v "$VERSION-$BUILD" \
-p "$OLDESTPWD/pdsh_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" \
"usr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment