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