infra/read-msg.sh

21 lines
244 B
Bash
Raw Permalink Normal View History

2024-10-26 05:03:58 +02:00
#!/bin/sh
read todo
if [ "$todo" = "" ] ; then
exit
fi
if [ "$todo" = "push" ] ; then
read filename
cat > "$filename"
exit
fi
if [ "$todo" = "exec" ] ; then
read command
exec bash -c "$command"
fi
echo "invalid command: $todo"