File: get-svn-source.sh

package info (click to toggle)
pugl 0~svn32%2Bdfsg0-3
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 1,960 kB
  • sloc: python: 15,116; ansic: 674; cpp: 258; objc: 256; sh: 30; makefile: 23
file content (24 lines) | stat: -rwxr-xr-x 699 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

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/pugl/trunk/pugl/ -l 1 | sed -ne "s/r\([0-9]\+\).*/\1/p"'

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/pugl/trunk/ pugl
cd pugl/
${UNPACK_WAF}
cd .. && tar cjf \
	${OLDDIR}/pugl_${BASE_REL}~svn${PUGL_SVN_COMMIT}.orig.tar.bz2 \
	pugl --exclude-vcs
rm -rf ${GOS_DIR}