From c558cad1adac85a12dde1dd63aedeacfb333457e Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 7 Dec 2020 21:48:11 -0500 Subject: Clean up variable expansions in c.sh --- bin/c.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/c.sh b/bin/c.sh index 6d2b6b35..f1143fd3 100644 --- a/bin/c.sh +++ b/bin/c.sh @@ -2,7 +2,7 @@ set -eu temp=$(mktemp -d) -trap 'rm -r "$temp"' EXIT +trap 'rm -r "${temp}"' EXIT exec 3>>"${temp}/run.c" @@ -28,8 +28,9 @@ cat >&3 < EOF +expr= while getopts 'e:i:' opt; do - case "$opt" in + case "${opt}" in (e) expr=$OPTARG;; (i) echo "#include <${OPTARG}>" >&3;; (?) exit 1;; @@ -44,7 +45,7 @@ int main(int argc, char *argv[]) { $*; EOF -if [ -n "${expr:-}" ]; then +if [ -n "${expr}" ]; then cat >&3 <&3 fi -- cgit 1.4.1 293db726811fb5a'>refs log tree commit diff
Commit message (Expand)Author
2022-04-20Make (pun) the dependencies make (pun) more senseJune McEnroe
2022-04-17Add HenchJune McEnroe
2022-04-14Publish "Agency"June McEnroe
2022-04-13Swap dates so the difference is always positiveJune McEnroe
2022-04-04Update "Care"June McEnroe
2022-04-03Publish "Care"June McEnroe
2022-03-31Publish "Compassion"June McEnroe
2022-03-24Skip matches with ident chars on either sideJune McEnroe
2022-03-24Add The Invisible Life of Addie LaRueJune McEnroe
2022-03-22Source ~/.profile.local if it existsJune McEnroe
2022-03-18Publish "Addendum 2021"June McEnroe
2022-03-16Remove wcwidth portJune McEnroe
2022-03-16Remove -j4 from ./PlanJune McEnroe
2022-03-15Rewrite Linux install.sh for DebianJune McEnroe
2022-03-15Remove dashJune McEnroe