From bbaa9bede596f68851b17ddd80f42a72ec17745b Mon Sep 17 00:00:00 2001 From: Evan Gates Date: Thu, 16 Jul 2015 11:49:45 -0700 Subject: [PATCH] sh style and syntax fixes quote all substitutions use $() instead of `` use . instead of source . needs a path with a / or it will search PATH instead --- build.sh | 5 ++--- env.sh | 8 ++++---- kcc | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index dea6489..42e3ef8 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,4 @@ #!/bin/sh -source env.sh -make $@ - +. ./env.sh +make "$@" diff --git a/env.sh b/env.sh index 30f3b88..fa599ea 100755 --- a/env.sh +++ b/env.sh @@ -1,15 +1,15 @@ #!/bin/sh -case `uname` in +case "$(uname)" in Plan9) CFLAGS="-D_SUSV2_SOURCE -DNBOOL" export CFLAGS ;; *) - case x$CC in - xc99) + case "$CC" in + c99) ;; - x|xgcc) + ''|gcc) CC=gcc CFLAGS=-std=c99 export CFLAGS CC diff --git a/kcc b/kcc index add6bc1..b996a20 100755 --- a/kcc +++ b/kcc @@ -1,6 +1,5 @@ #!/bin/sh -PATH=$PWD/cc1:$PWD/cc2 - -cc1 < $1 | cc2 +PATH="$PWD/cc1:$PWD/cc2" +cc1 < "$1" | cc2 -- 2.4.5