Files
oasis-linux-mirror/scripts/hash.rc
Michael Forney 51e359b2f8 tzdata: Fix gen.rc to not require contents of source files
This also fixes a symlink target calculation bug.
2016-07-04 21:47:29 -07:00

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