summaryrefslogtreecommitdiff
path: root/distribution/flatpak/make-source-archive
blob: 5e488236b7e9e9d81de7be832831dbc8fd62045e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
if [ $# -ne 1 ] ; then
	echo "$0 <BLDDIR>/distribution/flatpak"
	echo "Create source tar ball, with .xpm3 files"
	echo "Run from <SRCDIR>/distribution/flatpak"
	echo "Computes sha256 checksum which must updated in org.xtrkcad.xtrkcad.yml"
	exit 0
fi

SRCDIR=`pwd`
BLDDIR=$1

cd ../..
tar cf ${BLDDIR}/source.tar .
cd $BLDDIR/../../app/bin
tar rf ${BLDDIR}/source.tar ./bitmaps

cd $BLDDIR
rm -f source.tar.gz
# -n zeros the timestamp so repeated runs yield the same checksum
gzip -n source.tar
echo "Update org.xtrkcad.xtrkcad.yml with this checksum"
sha256sum source.tar.gz