diff options
| -rw-r--r-- | ninja.rc | 7 | ||||
| -rw-r--r-- | scripts/hash.rc | 6 |
2 files changed, 8 insertions, 5 deletions
@@ -128,16 +128,17 @@ fn yacc { fn file { out='$builddir/$repo.hash'/$1 - let args 100$3' '$1 --\ + mode=`{printf %4s $3 | tr ' ' 0 | tail -c 4} + let args 10$mode' '$1 --\ build $out githash $2 '|' '$builddir/$repo.stamp' scripts/hash.rc tree_inputs=($tree_inputs $out) - if(! ~ $3 755 644) tree_perms=($tree_perms 100$3' '$1) + if(! ~ $mode 0755 0644) tree_perms=($tree_perms 10$mode' '$1) status=() } fn dir { - tree_perms=($tree_perms '010'$2' '$1) + tree_perms=($tree_perms '040'$2' '$1) status=() } diff --git a/scripts/hash.rc b/scripts/hash.rc index e33b5682..5f894a6b 100644 --- a/scripts/hash.rc +++ b/scripts/hash.rc @@ -12,10 +12,12 @@ fn checkstatus {} hash=`{ switch($mode) { - case 120??? + case 12???? printf %s $1 | git -C $repo hash-object -w --stdin - case 100??? + case 10???? git -C $repo hash-object -w --stdin <$1 + case * + status=1 } } checkstatus |
