https://github.com/duckietown/Software
Raw File
Tip revision: dcdb0ee36cc5adf412b216ac5b07bbd55fca3d41 authored by Andrea F. Daniele on 16 November 2018, 20:17:05 UTC
Merge branch 'afdaniele-blockly' into master18
Tip revision: dcdb0ee
try.sh
#!/bin/bash

PIPE=/tmp/catpipe
trap "rm -f $PIPE" exit 1
[[ ! -p $PIPE ]] && mkfifo $PIPE

while true; do
     while read line; do
          case "$line" in
               @exit) rm -f $PIPE && exit 0;;
               @*) eval "${line#@}" ;;
               * ) echo "$line" ;;
          esac
     done <$PIPE
done

exit 2
back to top