forked from gkovacs/ffmpeg-concat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pullupstream
executable file
·19 lines (18 loc) · 1.22 KB
/
pullupstream
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
git checkout upstream-local
git pull upstream master
svnrevno=$(expr "$(git log --pretty=format:'' | wc -l)" + 33)
gitrevno=$(git show-ref 'refs/heads/upstream-local' | sed 's/ /\n/g' | head --lines 1)
committer=$(git log --pretty=format:'%H %an' | grep "$gitrevno" | sed 's/ /\n/' | tail --lines 1)
commitdate=$(git log --pretty=format:'%H %aD' | grep "$gitrevno" | sed 's/ /\n/' | tail --lines 1)
commitlog=$(git log --pretty=format:'%H %s' | grep "$gitrevno" | sed 's/ /\n/' | tail --lines 1)
git checkout master
git pull upstream master
printf "ffmpeg:\nsvn: $svnrevno\ngit: $gitrevno\ncommitter: $committer\ncommitdate: $commitdate\ncommitlog: $commitlog\n\n" > upstreamrev
cd libswscale
git pull origin master
gitrevno=$(git show-ref 'refs/heads/master' | sed 's/ /\n/g' | head --lines 1)
committer=$(git log --pretty=format:'%H %an' | grep "$gitrevno" | sed 's/ /\n/' | tail --lines 1)
commitdate=$(git log --pretty=format:'%H %aD' | grep "$gitrevno" | sed 's/ /\n/' | tail --lines 1)
commitlog=$(git log --pretty=format:'%H %s' | grep "$gitrevno" | sed 's/ /\n/' | tail --lines 1)
printf "libswscale:\nsvn: $svnrevno\ngit: $gitrevno\ncommitter: $committer\ncommitdate: $commitdate\ncommitlog: $commitlog\n" >> ../upstreamrev