fixed shake eval yet again

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
cd $(dirname "$(readlink -f "$0")")
SUDO=${SUDO:-sudo}
SUDO=${SUDO-sudo}
chmod +x shake
./shake bake.c -s $@ && \
$SUDO install -m 755 shake bake ${TARGET:-/usr/local/bin}

3
shake
View File

@ -60,10 +60,11 @@ line=${line//\$+/$@}
if [[ -n $line ]]; then
command="${line#*${MARK}}"
command=$(echo $command | sed 's/[^\\]\?#.*//')
echo "Exec: $command"
if [[ $run -eq 1 ]]; then
echo "Output:"
$command
sh -c "$command"
fi
else
echo -e "${MARKSTR} is not defined." >&2