ref: d0b5bbca0d530653369c8cc94214fe44cc2bfad1
parent: c7b52bd47910e2c14bc19422d14c432d20d92cce
author: Evan Gates <evan.gates@gmail.com>
date: Thu Jul 16 07:55:03 EDT 2015
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 -emg From bbaa9bede596f68851b17ddd80f42a72ec17745b Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.gates@gmail.com> 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
--- a/build.sh
+++ b/build.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-source env.sh
-make $@
-
+. ./env.sh
+make "$@"
--- 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
--- a/kcc
+++ b/kcc
@@ -1,6 +1,5 @@
#!/bin/sh
-PATH=$PWD/cc1:$PWD/cc2
+PATH="$PWD/cc1:$PWD/cc2"
-cc1 < $1 | cc2
-
+cc1 < "$1" | cc2
--
⑨