summarylogtreecommitdiffstats
path: root/update-branch.sh
blob: f089966cc905165d149901b47375eead0fc808aa (plain)
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

REMOTE_URL=https://github.com/archlinux/svntogit-community.git
REMOTE_BRANCH=packages/ddclient
LOCAL_BRANCH=upstream

git fetch "$REMOTE_URL" "$REMOTE_BRANCH"
git checkout -B "$LOCAL_BRANCH" FETCH_HEAD
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f --subdirectory-filter trunk \
	--tree-filter '(makepkg --printsrcinfo; status=$?; echo; exit $status) >.SRCINFO || rm .SRCINFO' \
	--commit-filter '
		if [ -e .SRCINFO ]
		then
			git commit-tree "$@"
		else
			shift
			while [ -n "$1" ]
			do
				shift
				map "$1"
				shift
			done
		fi'
git checkout -