icinga2/get_snapshot: Avoid --transform on tar

Incompatible on older systems...
This commit is contained in:
Markus Frosch 2017-04-21 16:06:37 +02:00
parent a5cdf4c9c8
commit 3f873fa338
1 changed files with 4 additions and 4 deletions

View File

@ -56,10 +56,10 @@ tarball="${workdir}/${PROJECT}-${package_version}.tar"
git archive --format=tar --prefix="${PROJECT}-${package_version}/" -o "${tarball}" HEAD
# creating version file for tarball
echo "#define VERSION \"$git_version\"" > icinga-version.h.force
# TODO: do we need this?
#touch -d`date +%Y%m%d` icinga-version.h.force
tar --append -f "${tarball}" --transform "s@^@${PROJECT}-${package_version}/@" icinga-version.h.force
mkdir "${PROJECT}-${package_version}"
echo "#define VERSION \"$git_version\"" > "${PROJECT}-${package_version}/"icinga-version.h.force
tar --append -f "${tarball}" "${PROJECT}-${package_version}/"*
rm -rf "${PROJECT}-${package_version}"
# pack tarball
gzip -vf9 "${tarball}"