mirror of
https://github.com/oasislinux/oasis.git
synced 2026-02-05 11:33:57 +01:00
25 lines
295 B
Bash
25 lines
295 B
Bash
#!/bin/rc
|
|
|
|
flag e +
|
|
|
|
repo=$1
|
|
mode=$2
|
|
name=$3
|
|
shift 3
|
|
|
|
fn checkstatus {}
|
|
|
|
hash=`{
|
|
switch($mode) {
|
|
case 12????
|
|
printf %s $1 | git -C $repo hash-object -w --stdin
|
|
case 10????
|
|
git -C $repo hash-object -w --stdin <$1
|
|
case *
|
|
status=1
|
|
}
|
|
}
|
|
checkstatus
|
|
|
|
printf '%s %s\t%s\n' $mode $hash $name
|