#!/bin/rc repodir = `$nl{git rev-parse --show-toplevel} if (!~ $status 0) { exit $status } reponame = `$nl{basename $repodir} cmds = `$nl{hhvn.uk/repo/mkrepo $reponame} # ignore $status here, as it will fail if repo # already exists, but we still want those cmds... # instead, use this sanity check to check for failure if (!~ `{echo $cmds | grep -Eo '^git| git ' | wc -l} 2) { exit 1 } for (cmd in $cmds) { echo RC -c $^cmd rc -c $^cmd }