On the first look, I would say it checks if directory specified in WORK exists. If it does, it checks if "" and sets it to "/tmp" if it is. Also, if it does not exist sets it to "/tmp".
Looks like some sort of working directory variable. Working directory can be "" (current directory).
So basically this script exists if /dev/shm exists, because user is probably supposed to enter his own directory in WORK.
Let me know what you think.