summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-26 01:38:15 -0700
committerMichael Forney <mforney@mforney.org>2016-06-26 01:38:15 -0700
commitda1c9aa1ab837323fe7b1dc051c93c3335edff8e (patch)
tree49d828a150446be79f9d9ecb957afea88f4d3378
parent0a12fad92f37d866f962ee960af6dfad295f6818 (diff)
Add argument sanity check to packaging rules
-rw-r--r--ninja.rc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ninja.rc b/ninja.rc
index 5ca331e4..755fb49a 100644
--- a/ninja.rc
+++ b/ninja.rc
@@ -127,6 +127,7 @@ fn yacc {
# packaging rules
fn file {
+ ~ $#* 3
if(fs $dir $1) {
out='$builddir/$repo.hash'/$1
mode=`{printf %4s $3 | tr ' ' 0 | tail -c 4}
@@ -140,11 +141,13 @@ fn file {
}
fn dir {
+ ~ $#* 2
if(fs $dir $1) tree_perms=($tree_perms '040'$2' '$1)
status=()
}
fn sym {
+ ~ $#* 2
if(fs $dir $1) {
out='$builddir/$repo.hash'/$1
let args 120000' '$1' '$2 --\