]> git.xolatile.top Git - emil-bake.git/commitdiff
Fixes return value of shake
authorEmil Williams <emilwilliams@tuta.io>
Sun, 21 Jan 2024 14:51:54 +0000 (14:51 +0000)
committerEmil Williams <emilwilliams@tuta.io>
Sun, 21 Jan 2024 14:51:54 +0000 (14:51 +0000)
bake.c
install.sh [changed mode: 0644->0755]
shake

diff --git a/bake.c b/bake.c
index 60928f0255cdf48d35215a0a9058af7532d269ff..91e0faedaa896b519daae0ca9b34f34275746039 100644 (file)
--- 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);
old mode 100644 (file)
new mode 100755 (executable)
index b93e229..cf35974
@@ -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 a445c432239f92bb9464da24f2453b6d4d918659..a6ffd842ac7630ed49f15c63196981159d16e487 100755 (executable)
--- 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