From e5e303548bf75441032a063c944436c35667c5fb Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Sun, 21 Jan 2024 14:51:54 +0000 Subject: [PATCH] Fixes return value of shake --- bake.c | 5 ++++- install.sh | 2 +- shake | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 install.sh diff --git a/bake.c b/bake.c index 60928f0..91e0fae 100644 --- a/bake.c +++ b/bake.c @@ -198,11 +198,14 @@ expand_size(char * buf, int argc, char ** argv) { len = max = strlen(buf) + 1; + #define str for (i = 0; i < len; ++i) { if (buf[i] == '\\') { i += 2; continue; - } else if (buf[i] == '$') { + } else if (strncmp()) + + else if (buf[i] == '$') { switch (buf[++i]) { case '@': max += strlen(g_filename); diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index b93e229..cf35974 --- a/install.sh +++ b/install.sh @@ -2,5 +2,5 @@ cd $(dirname "$(readlink -f "$0")") SUDO=${SUDO:-sudo} chmod +x shake -./shake bake.c -s +./shake bake.c -s $@ && \ $SUDO install -m 755 shake bake ${TARGET:-/usr/local/bin} diff --git a/shake b/shake index a445c43..a6ffd84 100755 --- a/shake +++ b/shake @@ -63,7 +63,7 @@ if [[ -n $line ]]; then echo "Exec: $command" if [[ $run -eq 1 ]]; then echo "Output:" - eval "$command" + $command fi else echo -e "${MARKSTR} is not defined." >&2