File: build-git-orig

package info (click to toggle)
heimdal 1.6~git20120403%2Bdfsg1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 34,428 kB
  • sloc: ansic: 338,234; sh: 7,993; makefile: 4,671; yacc: 3,036; perl: 1,888; python: 748; lex: 731; awk: 465; java: 119; asm: 30; lisp: 29
file content (17 lines) | stat: -rwxr-xr-x 550 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -e
# Build an orig.tar.gz file from a git snapshot
# See also http://www.h5l.org/sources.html

if [ -z "$1" ]; then
	version=$( dpkg-parsechangelog -l`dirname $0`/../changelog | sed -n 's/^Version: \(.*:\|\)//p' | sed 's/-[0-9.]\+$//' )
else
	version="$1"
fi
scriptdir=`dirname $0`

CHECKOUT_DIR="heimdal-$version"
git clone --depth 1 -l git://github.com/heimdal/heimdal "$CHECKOUT_DIR"
`dirname $0`/fix_git_source "$CHECKOUT_DIR"
rm -rf "$CHECKOUT_DIR/.git"
tar cz "$CHECKOUT_DIR" > "heimdal_$version.orig.tar.gz"
rm -rf "$CHECKOUT_DIR"