Files
oasis-linux-mirror/scripts/commit.rc
Michael Forney 78c4cc0023 Don't list git repository files as outputs
This way, ninja -t clean will work as expected.
2016-07-16 14:23:20 -07:00

22 lines
341 B
Bash

#!/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