receive () { if [ "$1" == send ]; then shift "$@" else boot "$@" fi } boot () { with-tempdir $0 send main "$@" } receive "$@"