summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/kbd/gen.rc2
-rw-r--r--core/perp/gen.rc6
-rw-r--r--scripts/commit.rc2
-rw-r--r--scripts/tree.rc2
-rwxr-xr-xsetup.rc2
5 files changed, 6 insertions, 8 deletions
diff --git a/core/kbd/gen.rc b/core/kbd/gen.rc
index 3a31628e..55f7d401 100644
--- a/core/kbd/gen.rc
+++ b/core/kbd/gen.rc
@@ -44,7 +44,7 @@ fn x {
exe $exe src/$exe.c $* libcommon.a libfont.a libkeymap.a
file bin/$exe '$outdir'/$exe 755
if(~ $sect ?~) {
- sect=`{printf %s $sect | head -c -1}
+ sect=`{printf %s $sect | cut -c -1}
let expr s,@DATADIR@,/share,g --\
build '$outdir'/$exe.$sect sed '$srcdir'/docs/man/man$sect/$exe.$sect.in
man='$outdir'/$exe.$sect
diff --git a/core/perp/gen.rc b/core/perp/gen.rc
index eba8f855..b38586ae 100644
--- a/core/perp/gen.rc
+++ b/core/perp/gen.rc
@@ -76,9 +76,7 @@ for(exe in run^(args argv0 choom detach deux env file limit lock pause session t
for(exe in cat^(args env limits uid)) x $exe runtools/$exe.c
for(man in */man/*.[1-9]) {
- ifs=() {
- sect=`{printf %s $man | tail -c 1}
- base=`{basename $man | head -c -1}
- }
+ sect=`{printf %s $man | tail -c 1}
+ base=`{basename $man}
file share/man/man$sect/$base.$sect '$srcdir'/$man 644
}
diff --git a/scripts/commit.rc b/scripts/commit.rc
index 21789d72..feb0f4ac 100644
--- a/scripts/commit.rc
+++ b/scripts/commit.rc
@@ -13,6 +13,6 @@ cd $repo
if([ -f refs/heads/$branch ]) parent=(-p $branch)
if not parent=()
-ifs=() { message='oasis built by '`{id -un | head -c -1} }
+message='oasis built by '`{id -un}
commit=`{echo $message | git commit-tree $tag $parent} ; checkstatus
git update-ref refs/heads/$branch $commit
diff --git a/scripts/tree.rc b/scripts/tree.rc
index 12bf9c32..d42f5bd6 100644
--- a/scripts/tree.rc
+++ b/scripts/tree.rc
@@ -8,7 +8,7 @@ index=$3
fn checkstatus {}
-ifs=() { oldcwd=`{pwd | head -c -1} }
+oldcwd=`{pwd}
cd $repo
git read-tree --empty
diff --git a/setup.rc b/setup.rc
index c5a99163..920dfbf1 100755
--- a/setup.rc
+++ b/setup.rc
@@ -38,7 +38,7 @@ fn gen {
tree_inputs=()
gen_inputs=()
- ifs=() { absdir=`{pwd | head -c -1} }
+ absdir=`{pwd}
{
set dir $dir
if(~ $dir .) set outdir '$builddir'