#!/bin/sh
ACT=".next"
CMD="dmenu.bin"
if [ "`pwd`" != "/usr/local/dmenu" ]; then 
    CMD="dmenu-host.bin"
fi

touch "$ACT"

if ./$CMD; then
    if [ -f "$ACT" ]; then 
        if  ! sh ./$ACT; then
            sleep 5
        fi
        rm -f "$ACT"
    fi
else
    sleep 1
fi
