Fixes return value of shake

This commit is contained in:
Emil Williams 2024-01-21 14:51:54 +00:00
parent fffee1c1e5
commit e5e303548b
No known key found for this signature in database
GPG Key ID: 5432DB986FDBCF8A
3 changed files with 6 additions and 3 deletions

5
bake.c
View File

@ -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);

2
install.sh Normal file → Executable file
View File

@ -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}

2
shake
View File

@ -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