File: make_src_targz.sh

package info (click to toggle)
codelite 12.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (50 lines) | stat: -rwxr-xr-x 1,922 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
38
39
40
41
42
43
44
45
46
47
48
49
50
################################################################################
## This file is part of CodeLite IDE and is released
## under the terms of the GNU General Public License as published by
##    the Free Software Foundation; either version 2 of the License, or
##    (at your option) any later version.
################################################################################

# Create tarballs suitable for the 3 platforms
# The script assumes that git HEAD has a suitable tag

curdir=`pwd`
HEAD=`git describe --tags`
# HEAD should have been tagged, but the tag probably reads vX.Y. If so, amputate the 'v'
initial=$(echo ${HEAD} | cut -c1)
if [ ${initial} = "v" ]; then
  HEAD=$(echo ${HEAD} | cut -c2-)
fi

codelite_ver="codelite-${HEAD}"
temptarball="CL-"`git rev-parse HEAD`

tmpdir="/tmp/"
rm -f ${tmpdir}${temptarball}
rm -fr ${tmpdir}${codelite_ver}

# Create a temporary tarball and extract it
git archive --format=tar --prefix=${codelite_ver}/ HEAD -o ${tmpdir}/${temptarball}
(cd ${tmpdir} && tar -xf ${temptarball} && rm -f ${temptarball})

# Create an up-to-date LiteEditor/autoversion.cpp and copy it into the 'archive'
$(./git-revision.sh)
cp ./LiteEditor/autoversion.cpp ${tmpdir}/${codelite_ver}/LiteEditor/

rm -fr ${tmpdir}/${codelite_ver}/sdk/curl

echo "Creating tarballs"
cd ${tmpdir}

# First for Linux
GZIP="-9" tar cvzf ${curdir}/${codelite_ver}-gtk.src.tar.gz --exclude='*.exe' --exclude='*.dll' --exclude='*.dylib' ${codelite_ver}/*
tar cv --xz -f ${curdir}/${codelite_ver}-gtk.src.tar.xz --exclude='*.exe' --exclude='*.dll' --exclude='*.dylib' ${codelite_ver}/* 

# then for MSWin
#tar cv --lzma -f ${curdir}/${codelite_ver}-win.src.tar.7z --exclude='*.so' --exclude='*.dylib' ${codelite_ver}/*

# and OS/X
#GZIP="-9" tar cvzf ${curdir}/${codelite_ver}-mac.src.tar.gz --exclude='*.exe' --exclude='*.dll' --exclude=*.so ${codelite_ver}/*

# Clean up
rm -rf ${codelite_ver}