File: get-svn-source.sh

package info (click to toggle)
ganv 1.4.2~dfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,276 kB
  • ctags: 2,655
  • sloc: python: 12,783; ansic: 5,830; cpp: 3,981; sh: 214; makefile: 29
file content (28 lines) | stat: -rwxr-xr-x 795 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -e

PACKAGE=ganv
BASE_REL=$(dpkg-parsechangelog 2>/dev/null | sed -ne 's/Version: \([0-9]\)~.*/\1/p')
OLDDIR=${PWD}
GOS_DIR=${OLDDIR}/get-orig-source
SVN_COMMIT="svn log http://svn.drobilla.net/lad/trunk/${PACKAGE}/ -l 1 | sed -ne 's/r\([0-9]\+\).*/\1/p'"
REPACK_SUFFIX=~dfsg0

if [ -z ${BASE_REL} ]; then
	echo 'Please run this script from the sources root directory.'
	exit 1
fi

UNPACK_WAF=$PWD/debian/unpack_waf.sh

rm -rf ${GOS_DIR}
mkdir ${GOS_DIR} && cd ${GOS_DIR}
PUGL_SVN_COMMIT=$(eval "${SVN_COMMIT}")
svn export -r ${PUGL_SVN_COMMIT} http://svn.drobilla.net/lad/trunk/${PACKAGE} ${PACKAGE}
cd ${PACKAGE}/
${UNPACK_WAF}
cd .. && tar cjf \
	${OLDDIR}/${PACKAGE}_${BASE_REL}~svn${PUGL_SVN_COMMIT}${REPACK_SUFFIX}.orig.tar.bz2 \
	${PACKAGE} --exclude-vcs
rm -rf ${GOS_DIR}