2015-09-09 22:21:51 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$#" -ne 2 ] || ! [ -d "$1" ]; then
|
|
|
|
echo "Usage: $0 <REPO-DIR> <BUILD-ID>" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
repodir="$1"
|
|
|
|
buildid="$2"
|
2019-07-18 22:28:35 +02:00
|
|
|
builddir=$repodir/build-$buildid
|
2015-09-09 22:21:51 +02:00
|
|
|
echo build directory = $builddir
|
2019-07-18 21:26:02 +02:00
|
|
|
echo repository root directory = $repodir
|
2015-09-09 22:21:51 +02:00
|
|
|
if ! [ -d "$builddir" ]; then
|
|
|
|
echo "Could not find build director"
|
|
|
|
exit 1
|
|
|
|
fi
|
2016-03-13 17:56:00 +01:00
|
|
|
|
2019-07-18 21:26:02 +02:00
|
|
|
outfile="$repodir/deploy/hyperion.ng_$buildid.tar.gz"
|
2015-09-09 22:21:51 +02:00
|
|
|
echo create $outfile
|
|
|
|
|
2016-03-15 20:33:38 +01:00
|
|
|
tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-read\
|
2015-09-09 22:21:51 +02:00
|
|
|
--file "$outfile" \
|
|
|
|
--transform "s:$builddir/bin/:hyperion/bin/:" \
|
|
|
|
--transform "s:$repodir/config/:hyperion/config/:" \
|
2019-07-18 21:26:02 +02:00
|
|
|
--transform "s:$repodir/bin/service/hyperion.init:hyperion/services/hyperion.init:" \
|
|
|
|
--transform "s:$repodir/bin/service/hyperion.systemd:hyperion/services/hyperion.systemd:" \
|
|
|
|
--transform "s:$repodir/bin/service/hyperion.initctl:hyperion/services/hyperion.initctl:" \
|
2015-09-09 22:21:51 +02:00
|
|
|
--transform "s://:/:g" \
|
2016-05-22 00:27:06 +02:00
|
|
|
"$builddir/bin/hyperion"* \
|
2019-06-10 15:19:08 +02:00
|
|
|
"$repodir/bin/service/hyperion.init" \
|
|
|
|
"$repodir/bin/service/hyperion.systemd" \
|
|
|
|
"$repodir/bin/service/hyperion.initctl" \
|
|
|
|
"$repodir/config/hyperion.config.json.default"
|
2015-09-09 22:21:51 +02:00
|
|
|
|