File: get-svn-source.sh

package info (click to toggle)
swami 2.0.0%2Bsvn389-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,320 kB
  • ctags: 3,912
  • sloc: ansic: 33,423; sh: 10,272; makefile: 604; xml: 22; sed: 16
file content (22 lines) | stat: -rwxr-xr-x 719 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
#!/bin/sh

BASE_REL=$(dpkg-parsechangelog 2>/dev/null | sed -ne 's/^Version: \(\([0-9]+\)\)\?\(.*\)-.*/\3/p' | sed 's/[+~-].*//') 
OLDDIR=${PWD}
GOS_DIR=${OLDDIR}/get-orig-source
SVN_COMMIT='svn log https://swami.svn.sourceforge.net/svnroot/swami/trunk/swami -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}
SWAMI_SVN_COMMIT=$(eval "${SVN_COMMIT}")
svn export -r ${SWAMI_SVN_COMMIT} https://swami.svn.sourceforge.net/svnroot/swami/trunk/swami/ swami
cd swami/
cd .. && tar cfz \
	${OLDDIR}/swami_${BASE_REL}+svn${SWAMI_SVN_COMMIT}.orig.tar.gz \
	swami
rm -rf ${GOS_DIR}