strawberry-audio-player-win.../dist/scripts/maketarball.sh.in

69 lines
1.7 KiB
Bash
Raw Normal View History

2018-02-27 18:06:05 +01:00
#!/bin/bash
name=strawberry
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
2022-01-15 17:52:35 +01:00
cmds="gtar tar"
for cmd in $cmds
do
which $cmd >/dev/null 2>&1
if [ ! $? -eq 0 ]; then
continue
fi
result=$($cmd --version 2>&1 | head -n1)
if [ ! $? -eq 0 ]; then
continue
fi
echo "$result" | grep "^.* (GNU tar) .*$" >/dev/null 2>&1
if [ ! $? -eq 0 ]; then
continue
fi
TAR=$cmd
done
if [ "$TAR" = "" ]; then
echo "ERROR: Missing GNU Tar"
exit 1
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"
2022-01-15 17:52:35 +01:00
${TAR} -cJf $name-$version.tar.xz \
2018-07-01 01:29:52 +02:00
--transform "s,^$rootnoslash,$name-$version," $exclude_vcs \
2020-04-09 02:32:17 +02:00
--exclude=".directory" \
2018-09-18 00:45:07 +02:00
--exclude="*.tar" \
--exclude="*.tar.*" \
--exclude="*.bz" \
--exclude="*.bz2" \
--exclude="*.xz" \
--exclude="*.spec" \
--exclude="*.nsi" \
2020-04-09 02:32:17 +02:00
--exclude="*.kdev4" \
--exclude=".vscode" \
2022-08-29 17:53:49 +02:00
--exclude=".idea" \
2019-11-09 17:16:18 +01:00
--exclude="$root/.github" \
2019-04-02 18:46:04 +02:00
--exclude="$root/.travis.yml" \
2020-04-09 02:32:17 +02:00
--exclude="$root/.circleci" \
--exclude="$root/Dockerfile" \
2018-09-18 00:45:07 +02:00
--exclude="$root/CMakeLists.txt.user" \
--exclude="$root/.clang-format" \
2018-09-18 00:45:07 +02:00
--exclude="$root/build" \
2022-08-29 17:53:49 +02:00
--exclude="$root/cmake-build-debug" \
2019-04-02 18:46:04 +02:00
--exclude="$root/zanata.xml" \
--exclude="$root/.zanata-cache" \
2019-09-23 22:23:30 +02:00
--exclude="$root/debian/changelog" \
--exclude="$root/dist/scripts/maketarball.sh" \
2019-02-04 23:30:08 +01:00
--exclude="$root/dist/macos/Info.plist" \
--exclude="$root/dist/windows/windres.rc" \
2019-09-23 22:23:30 +02:00
--exclude="$root/src/translations/translations.pot" \
2018-02-27 18:06:05 +01:00
"$root"