From f30aa4c382821fd33ae12e091287899c45f2c7f6 Mon Sep 17 00:00:00 2001 From: "C. 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 > about summary refs log tree commit diff
Commit message (Expand)Author
2019-01-02ui-shared: fix broken sizeof in title setting and rewriteJason A. Donenfeld
2018-12-09git: update to v2.20.0Christian Hesse
2018-11-25ui-blame: set repo for sbJason A. Donenfeld
2018-11-25auth-filter: pass url with query string attachedJason A. Donenfeld
2018-11-21git: use xz compressed archive for downloadChristian Hesse
2018-10-12git: update to v2.19.1Christian Hesse
2018-09-11ui-ssdiff: ban strcat()Christian Hesse
2018-09-11ui-ssdiff: ban strncpy()Christian Hesse
2018-09-11ui-shared: ban strcat()Christian Hesse
2018-09-11ui-patch: ban sprintf()Christian Hesse
2018-09-11ui-log: ban strncpy()Christian Hesse
2018-09-11ui-log: ban strcpy()Christian Hesse
2018-09-11parsing: ban sprintf()Christian Hesse
2018-09-11parsing: ban strncpy()Christian Hesse
2018-08-28filters: generate anchor links from markdownChristian Hesse
2018-08-03Bump version.Jason A. Donenfeld
2018-08-03clone: fix directory traversalJason A. Donenfeld
2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev