infra/read-msg.sh
2024-10-26 05:03:58 +02:00

20 lines
244 B
Bash

#!/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"