File: prepsource

package info (click to toggle)
barnowl 1.10-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 5,472 kB
  • sloc: ansic: 36,670; perl: 20,938; sh: 1,598; makefile: 181
file content (20 lines) | stat: -rwxr-xr-x 498 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh 
set -e
if [ $# -lt 2 ]; then
echo Usage: $0 tarfile merge_tag upstream_tag
exit 2
fi
tarfile=$1
merge_tag=$2
upstream_tag=$3
dir=$( basename $(tar tzf $tarfile |head -1 ) )
tar xzf $tarfile
git add -f $dir
tree=$( git write-tree --prefix=${dir}/ )
commit=$( echo "Merge in $merge_tag to upstream by unpacking $tarfile."  | \
    git commit-tree $tree -p upstream -p $( git rev-list -n1  $merge_tag )  )

git branch -f upstream $commit
git tag $upstream_tag $commit
git rm -q -r -f $dir