forked from honeycombio/honeytail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-pkg.sh
More file actions
executable file
·42 lines (36 loc) · 855 Bytes
/
build-pkg.sh
File metadata and controls
executable file
·42 lines (36 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Build deb or rpm packages for honeytail.
set -e
function usage() {
echo "Usage: build-pkg.sh -m <arch> -v <version> -t <package_type>"
exit 2
}
while getopts "v:t:m:" opt; do
case "$opt" in
v)
version=$OPTARG
;;
t)
pkg_type=$OPTARG
;;
m)
arch=$OPTARG
;;
esac
done
if [ -z "$pkg_type" ] || [ -z "$arch" ]; then
usage
fi
if [ -z "$version" ]; then
version=v0.0.0-dev
fi
fpm -s dir -n honeytail \
-m "Honeycomb <team@honeycomb.io>" \
-v ${version#v} \
-t $pkg_type \
-a $arch \
--pre-install=./preinstall \
~/artifacts/honeytail-linux-${arch}=/usr/bin/honeytail \
./honeytail.upstart=/etc/init/honeytail.conf \
./honeytail.service=/lib/systemd/system/honeytail.service \
./honeytail.conf=/etc/honeytail/honeytail.conf