2018-02-27 18:06:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
name=strawberry
|
2018-04-01 18:32:31 +02:00
|
|
|
version="@STRAWBERRY_VERSION_PACKAGE@"
|
2018-07-01 01:29:52 +02:00
|
|
|
gitrev="@INCLUDE_GIT_REVISION@"
|
2018-07-03 17:51:52 +02:00
|
|
|
root=$(cd "${0%/*}/../.." && echo $PWD/${0##*/})
|
2018-02-27 18:06:05 +01:00
|
|
|
root=`dirname "$root"`
|
|
|
|
rootnoslash=`echo $root | sed "s/^\///"`
|
|
|
|
|
2018-07-01 01:29:52 +02:00
|
|
|
if ! [ "$gitrev" = "ON" ]; then
|
|
|
|
exclude_vcs="--exclude-vcs"
|
|
|
|
fi
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
echo "Creating $name-$version.tar.xz..."
|
|
|
|
|
2018-04-01 19:41:23 +02:00
|
|
|
rm -f "$name-$version.tar.xz"
|
2018-02-27 18:06:05 +01:00
|
|
|
tar -cJf $name-$version.tar.xz \
|
2018-07-01 01:29:52 +02:00
|
|
|
--transform "s,^$rootnoslash,$name-$version," $exclude_vcs \
|
2018-09-18 00:45:07 +02:00
|
|
|
--exclude="*.tar" \
|
|
|
|
--exclude="*.tar.*" \
|
|
|
|
--exclude="*.bz" \
|
|
|
|
--exclude="*.bz2" \
|
|
|
|
--exclude="*.xz" \
|
|
|
|
--exclude=".directory" \
|
|
|
|
--exclude="*.spec" \
|
|
|
|
--exclude="*.nsi" \
|
|
|
|
--exclude="$root/CMakeLists.txt.user" \
|
|
|
|
--exclude="$root/build" \
|
2018-10-16 21:29:00 +02:00
|
|
|
--exclude="$root/dist/debian/changelog" \
|
2018-12-13 23:31:13 +01:00
|
|
|
--exclude="$root/dist/pacman/PKGBUILD" \
|
2018-02-27 18:06:05 +01:00
|
|
|
"$root"
|