File: make_src_dist.sh

package info (click to toggle)
yubihsm-shell 2.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,020 kB
  • sloc: ansic: 41,745; sh: 2,030; cpp: 528; makefile: 18; xml: 16
file content (29 lines) | stat: -rwxr-xr-x 706 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
# Script to produce the source distribution package

VERSION=$1 # Full yubihsm-shell version, tex 2.1.0

mkdir dist_build; cd dist_build
cmake ..
make
cd ..
rm -r dist_build

set +e
set -x

tar --exclude README                  \
    --exclude .git                    \
    --exclude .github                 \
    --exclude .gitignore              \
    --exclude .ci                     \
    --exclude .clang-format           \
    --exclude .pre-commit-config.yaml \
    --exclude .travis.yml             \
    --transform="s/^\./yubihsm-shell-$VERSION/" -czf yubihsm-shell-$VERSION.tar.gz .
exitcode=$?
if [ "$exitcode" != "1" ] && [ "$exitcode" != "0" ]; then
    exit $exitcode
fi

set -e