hyperion.ng/bin/create_release.sh
brindosch f04d48063d [DO NOT MERGE] Preperation for V1.03.0 (#672)
Preperation for V1.03.0

Former-commit-id: d3ef9dbe74df304dd0653818415f10401ac72af4
2016-06-10 18:32:39 +02:00

37 lines
1.2 KiB
Bash

#!/bin/sh
if [ "$#" -ne 2 ] || ! [ -d "$1" ]; then
echo "Usage: $0 <REPO-DIR> <BUILD-ID>" >&2
exit 1
fi
repodir="$1"
buildid="$2"
builddir=$repodir/build-$buildid
echo build directory = $builddir
echo repository root dirrectory = $repodir
if ! [ -d "$builddir" ]; then
echo "Could not find build director"
exit 1
fi
outfile="$repodir/deploy/hyperion_$buildid.tar.gz"
echo create $outfile
tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-read\
--file "$outfile" \
--transform "s:$builddir/bin/:hyperion/bin/:" \
--transform "s:$repodir/effects/:hyperion/effects/:" \
--transform "s:$repodir/config/:hyperion/config/:" \
--transform "s:$repodir/bin/service/hyperion.init.sh:hyperion/services/hyperion.init.sh:" \
--transform "s:$repodir/bin/service/hyperion.systemd.sh:hyperion/services/hyperion.systemd.sh:" \
--transform "s:$repodir/bin/service/hyperion.initctl.sh:hyperion/services/hyperion.initctl.sh:" \
--transform "s://:/:g" \
"$builddir/bin/hyperion"* \
"$repodir/effects/"* \
"$repodir/bin/service/hyperion.init.sh" \
"$repodir/bin/service/hyperion.systemd.sh" \
"$repodir/bin/service/hyperion.initctl.sh" \
"$repodir/config/hyperion.config.json.example"