summaryrefslogtreecommitdiff
path: root/scripts/commit.rc
blob: 21789d72ab4a320d9708713737255203b8ff672c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/rc

flag e +

repo=$1
branch=$2
tag=$3

fn checkstatus {}

cd $repo

if([ -f refs/heads/$branch ]) parent=(-p $branch)
if not parent=()

ifs=() { message='oasis built by '`{id -un | head -c -1} }
commit=`{echo $message | git commit-tree $tag $parent} ; checkstatus
git update-ref refs/heads/$branch $commit