summaryrefslogtreecommitdiff
path: root/ninja.rc
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-06 20:36:39 -0700
committerMichael Forney <mforney@mforney.org>2016-06-06 20:38:54 -0700
commitdac3b279e368a0ae06c1fc6f800b6f55e396bb32 (patch)
tree3b37875d7df45719a2b50271e7a09d1733b81098 /ninja.rc
parent8711f622cc62ec92fb4a34809a989de03a967ffa (diff)
Fix special permission handling
Diffstat (limited to 'ninja.rc')
-rw-r--r--ninja.rc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ninja.rc b/ninja.rc
index 5b105631..1b9f5f86 100644
--- a/ninja.rc
+++ b/ninja.rc
@@ -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=()
}