mirror of
https://github.com/oasislinux/oasis.git
synced 2026-02-01 11:34:17 +01:00
20 lines
377 B
Bash
20 lines
377 B
Bash
#!/bin/rc
|
|
|
|
flag e +
|
|
|
|
repo=$1
|
|
branch=$2
|
|
tag=$3
|
|
out=$4
|
|
|
|
fn checkstatus {}
|
|
|
|
if(git -C $repo show-ref -q --verify refs/heads/$branch)
|
|
parent=(-p $branch)
|
|
if not parent=()
|
|
|
|
message='oasis built by '`{id -un}
|
|
commit=`{echo $message | git -C $repo commit-tree $tag $parent} ; checkstatus
|
|
git -C $repo update-ref refs/heads/$branch $commit
|
|
echo $commit > $out.tmp && mv $out.tmp $out
|