From 142c5870a9b6ba6f4d7af7bbdf46a72c22ee2983 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 16 Apr 2016 02:01:32 -0700 Subject: Use the name "oldcwd" for previous working directory --- rules.ninja | 2 +- scripts/tree.rc | 4 ++-- setup.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rules.ninja b/rules.ninja index 5ec4c01a..a77e011f 100644 --- a/rules.ninja +++ b/rules.ninja @@ -25,7 +25,7 @@ rule cat command = cat $in >$out.tmp && mv $out.tmp $out rule yacc - command = oldpwd=$$PWD && cd $outdir && $yacc $yaccflags $$oldpwd/$in + command = oldcwd=$$PWD && cd $outdir && $yacc $yaccflags $$oldcwd/$in rule sed command = sed $expr >$out.tmp $in && mv $out.tmp $out diff --git a/scripts/tree.rc b/scripts/tree.rc index b641c922..28916224 100644 --- a/scripts/tree.rc +++ b/scripts/tree.rc @@ -11,10 +11,10 @@ fn checkstatus { status=() } -ifs=() { oldpwd=`{pwd | head -c -1} } +ifs=() { oldcwd=`{pwd | head -c -1} } cd $repo git read-tree --empty -git update-index --index-info <$oldpwd/$index +git update-index --index-info <$oldcwd/$index tree=`{git write-tree} ; checkstatus git update-ref refs/tags/$tag $tree diff --git a/setup.rc b/setup.rc index e87b541c..4bd176cb 100755 --- a/setup.rc +++ b/setup.rc @@ -45,14 +45,14 @@ fn gen { set outdir $outdir } - ifs=() { old_pwd=`{pwd | head -c -1} } + ifs=() { oldcwd=`{pwd | head -c -1} } . ./gen.rc build 'phony/$srcdir/gen' phony '$srcdir'/local.ninja $gen_inputs build '$srcdir'/local.ninja gen '|' setup.rc ninja.rc '$srcdir'/gen.rc if(! ~ $#tree_perms 0) { - printf '%s\n' $tree_perms >$old_pwd/local.perms + printf '%s\n' $tree_perms >$oldcwd/local.perms perms_inputs=( $perms_inputs '$srcdir'/local.perms ) } if(~ $#perms_inputs 0) build '$outdir/root.perms' stamp -- cgit v1.2.3