Created
March 2, 2015 20:31
-
-
Save nbrownus/12f8fbe1c1d6ab8ba8d0 to your computer and use it in GitHub Desktop.
Creates a deb for pig
This file contains hidden or 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
| #!/bin/sh | |
| VERSION="0.12.1" | |
| BUILD="betable1" | |
| set -e -x | |
| DIRNAME="$(cd "$(dirname "$0")" && pwd)" | |
| OLDESTPWD="$PWD" | |
| cd "$(mktemp -d)" | |
| #trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM | |
| curl -O "http://apache.mirrors.hoobly.com/pig/pig-$VERSION/pig-$VERSION.tar.gz" | |
| tar xf "pig-$VERSION.tar.gz" | |
| DIRNAME="pig-$VERSION" | |
| mkdir -p "$PWD/rootfs/var/lib/pig/lib" "$PWD/rootfs/usr/bin" "$PWD/rootfs/etc/pig" | |
| mv "$DIRNAME/conf/"* "rootfs/etc/pig/" | |
| mv "$DIRNAME/bin/pig" "rootfs/usr/bin/" | |
| mv "$DIRNAME/lib/jython"* "rootfs/var/lib/pig/lib" | |
| mv "$DIRNAME/pig-$VERSION-withouthadoop.jar" "rootfs/var/lib/pig/pig-withouthadoop.jar" | |
| fakeroot fpm -C "$PWD/rootfs" \ | |
| -m "Nate Brown <nate@betable.com>" \ | |
| -n "pig" -v "$VERSION-$BUILD" \ | |
| -p "$OLDESTPWD/pig_${VERSION}-${BUILD}_amd64.deb" \ | |
| -s "dir" -t "deb" \ | |
| "usr" "etc" "var" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment