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

flag e +

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

fn checkstatus {}

wd=`{pwd}
cd $repo

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

message='oasis built by '`{id -un}
commit=`{echo $message | git commit-tree $tag $parent} ; checkstatus
git update-ref refs/heads/$branch $commit
ln -f refs/heads/$branch $wd/$out