fixed shake eval yet again
This commit is contained in:
parent
e5e303548b
commit
f21841ad99
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd $(dirname "$(readlink -f "$0")")
|
cd $(dirname "$(readlink -f "$0")")
|
||||||
SUDO=${SUDO:-sudo}
|
SUDO=${SUDO-sudo}
|
||||||
chmod +x shake
|
chmod +x shake
|
||||||
./shake bake.c -s $@ && \
|
./shake bake.c -s $@ && \
|
||||||
$SUDO install -m 755 shake bake ${TARGET:-/usr/local/bin}
|
$SUDO install -m 755 shake bake ${TARGET:-/usr/local/bin}
|
||||||
|
3
shake
3
shake
@ -60,10 +60,11 @@ line=${line//\$+/$@}
|
|||||||
|
|
||||||
if [[ -n $line ]]; then
|
if [[ -n $line ]]; then
|
||||||
command="${line#*${MARK}}"
|
command="${line#*${MARK}}"
|
||||||
|
command=$(echo $command | sed 's/[^\\]\?#.*//')
|
||||||
echo "Exec: $command"
|
echo "Exec: $command"
|
||||||
if [[ $run -eq 1 ]]; then
|
if [[ $run -eq 1 ]]; then
|
||||||
echo "Output:"
|
echo "Output:"
|
||||||
$command
|
sh -c "$command"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${MARKSTR} is not defined." >&2
|
echo -e "${MARKSTR} is not defined." >&2
|
||||||
|
Loading…
Reference in New Issue
Block a user