[hackers] [scc] sh style and syntax fixes || Evan Gates
commit d0b5bbca0d530653369c8cc94214fe44cc2bfad1
Author: Evan Gates <evan.gates_AT_gmail.com>
AuthorDate: Thu Jul 16 11:55:03 2015 -0700
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jul 17 07:09:43 2015 +0200
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_AT_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
diff --git a/build.sh b/build.sh
index dea6489..42e3ef8 100755
--- a/build.sh
+++ b/build.sh
_AT_@ -1,5 +1,4 @@
#!/bin/sh
-source env.sh
-make $_AT_
-
+. ./env.sh
+make "$_AT_"
diff --git a/env.sh b/env.sh
index 30f3b88..fa599ea 100755
--- a/env.sh
+++ b/env.sh
_AT_@ -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
_AT_@ -1,6 +1,5 @@
#!/bin/sh
-PATH=$PWD/cc1:$PWD/cc2
-
-cc1 < $1 | cc2
+PATH="$PWD/cc1:$PWD/cc2"
+cc1 < "$1" | cc2
Received on Fri Jul 17 2015 - 07:14:50 CEST
This archive was generated by hypermail 2.3.0
: Fri Jul 17 2015 - 07:24:11 CEST