diff options
| author | Michael Forney <mforney@mforney.org> | 2016-06-06 20:36:39 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-06-06 20:38:54 -0700 |
| commit | dac3b279e368a0ae06c1fc6f800b6f55e396bb32 (patch) | |
| tree | 3b37875d7df45719a2b50271e7a09d1733b81098 | |
| parent | 8711f622cc62ec92fb4a34809a989de03a967ffa (diff) | |
Fix special permission handling
| -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 |
