File: create_tarballs.sh

package info (click to toggle)
hotspot 1.6.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,756 kB
  • sloc: cpp: 27,071; ansic: 281; sh: 261; python: 75; xml: 48; makefile: 16
file content (37 lines) | stat: -rwxr-xr-x 1,681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# SPDX-FileCopyrightText: Milian Wolff <milian.wolff@kdab.com>
# SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
#
# SPDX-License-Identifier: GPL-2.0-or-later
#

version="$1"
output_dir="$2"

set -e

if [ -z "$version" -o -z "$output_dir" ]; then
  echo "create_tarballs.sh VERSION OUTPUT_DIR"
  echo
  echo "e.g.: create_tarballs.sh v1.1.0 /tmp"
  exit 1
fi

set -x

cd $output_dir

git clone --branch $version --recurse-submodules \
    git@github.com:KDAB/hotspot.git \
    "hotspot-$version"

tar --exclude="*/.git/*" --exclude="*/.git" -cvzf "hotspot-$version.tar.gz" "hotspot-$version"
tar --exclude="*/.git/*" --exclude="*/.git" -cvzf "hotspot-perfparser-$version.tar.gz" "hotspot-$version/3rdparty/perfparser"
tar --exclude="*/.git/*" --exclude="*/.git" -cvzf "hotspot-PrefixTickLabels-$version.tar.gz" "hotspot-$version/3rdparty/PrefixTickLabels"
zip -r --exclude="*/.git/*" --exclude="*/.git" "hotspot-$version.zip" "hotspot-$version"
zip -r --exclude="*/.git/*" --exclude="*/.git" "hotspot-perfparser-$version.zip" "hotspot-$version/3rdparty/perfparser"
zip -r --exclude="*/.git/*" --exclude="*/.git" "hotspot-PrefixTickLabels-$version.zip" "hotspot-$version/3rdparty/PrefixTickLabels"

md5sum "hotspot-$version.tar.gz" "hotspot-$version.zip" "hotspot-perfparser-$version.tar.gz" "hotspot-perfparser-$version.zip" "hotspot-PrefixTickLabels-$version.tar.gz" "hotspot-PrefixTickLabels-$version.zip"
sha1sum "hotspot-$version.tar.gz" "hotspot-$version.zip" "hotspot-perfparser-$version.tar.gz" "hotspot-perfparser-$version.zip" "hotspot-PrefixTickLabels-$version.tar.gz" "hotspot-PrefixTickLabels-$version.zip"