Root/debian/get-orig-source.sh

Source at commit d76f7d19a894bcf90fe5118c8573549ebf9d56d0 created 7 years 3 months ago.
By Xiangfu, debian: cleanup changelog, include debian build flags
1#!/bin/sh
2# Build a tarball from the latest upstream version, with a nice
3# version number.
4#
5# Requires git 1.6.6 or later, GNU date, and gzip.
6
7set -e
8
9: ${REPO=git://projects.qi-hardware.com/fped.git}
10: ${BRANCH=remotes/origin/master}
11
12mkdir debian-orig-source
13trap 'rm -fr debian-orig-source || exit 1' EXIT
14
15git init -q debian-orig-source
16GIT_DIR=$(pwd)/debian-orig-source/.git
17export GIT_DIR
18
19# Fetch latest upstream version.
20git fetch -q "$REPO" "$BRANCH"
21
22# Determine version number.
23release=0.1
24date=$(date --utc --date="$(git log -1 --pretty=format:%cD FETCH_HEAD)" "+%Y%m")
25upstream_version="${release}+${date}"
26
27# Generate tarball.
28echo "packaging $(git rev-parse --short FETCH_HEAD)"
29git archive --format=tar --prefix="fped_${date}/" FETCH_HEAD |
30    gzip -n -9 >"fped_$upstream_version.orig.tar.gz"
31

Archive Download this file

Branches:
master



interactive