Use QThreadPool to invoke free disk space checking jobs
[qBittorrent.git] / build_dist.sh
blobaa00205d78ccdf8bc30b91005e2418d674b82934
1 #!/bin/sh
3 # get version numbers
4 versionSrc="src/base/version.h.in"
5 versionMajor="$(grep -Po '(?<=QBT_VERSION_MAJOR )\d+' "$versionSrc")"
6 versionMinor="$(grep -Po '(?<=QBT_VERSION_MINOR )\d+' "$versionSrc")"
7 versionBugfix="$(grep -Po '(?<=QBT_VERSION_BUGFIX )\d+' "$versionSrc")"
8 versionBuild="$(grep -Po '(?<=QBT_VERSION_BUILD )\d+' "$versionSrc")"
9 versionStatus="$(grep -Po '(?<=QBT_VERSION_STATUS ")\w+' "$versionSrc")"
11 if [ "$versionBuild" != "0" ]; then
12 projectVersion="$versionMajor.$versionMinor.$versionBugfix.$versionBuild$versionStatus"
13 else
14 projectVersion="$versionMajor.$versionMinor.$versionBugfix$versionStatus"
17 # pack archives
18 git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | gzip -9 > "qbittorrent-$projectVersion.tar.gz"
19 git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | xz -9 > "qbittorrent-$projectVersion.tar.xz"