File: get-svn-source.sh

package info (click to toggle)
python-leveldb 0~svn68-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 172 kB
  • ctags: 167
  • sloc: cpp: 1,252; python: 333; sh: 113; makefile: 18
file content (23 lines) | stat: -rwxr-xr-x 741 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
#!/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://py-leveldb.googlecode.com/svn/trunk/ -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


rm -rf ${GOS_DIR}
mkdir ${GOS_DIR} && cd ${GOS_DIR}
PY_LEVELDB_SVN_COMMIT=$(eval "${SVN_COMMIT}")
svn export --ignore-externals -r ${PY_LEVELDB_SVN_COMMIT} \
   http://py-leveldb.googlecode.com/svn/trunk/ python-leveldb
cd python-leveldb/
cd .. && tar cjf \
	${OLDDIR}/python-leveldb_${BASE_REL}~svn${PY_LEVELDB_SVN_COMMIT}.orig.tar.bz2 \
	python-leveldb --exclude-vcs
rm -rf ${GOS_DIR}