File: mksnapshot.sh

package info (click to toggle)
khronos-opencl-clhpp 2.0.10%2Bgit26-g806646c-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 932 kB
  • sloc: cpp: 14,727; python: 103; makefile: 41; sh: 10
file content (18 lines) | stat: -rwxr-xr-x 463 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -e

# creates an upstream snapshot tarball
# run from within the upstream git repository

commit=${1:-HEAD}
describe=$(git describe --long --tags ${commit})
ver=${describe%%-*}
gitsuffix=${describe#*-}

base=OpenCL-CLHPP-${ver#v}+git${gitsuffix}
tarball=${base}.tar.xz

git archive --prefix ${base}/ ${commit} | xz > ${tarball}
touch -d "@$(git log -1 --format=format:%ct ${commit})" ${tarball}

echo "Generated snapshot of ${commit} in ${tarball}"