setup-env.sh: now compatible with  bash, zsh, and dash
setup-env.sh: now compatible with  bash, zsh, and dash

- replace use of [[ with [

- replace function foo { .. } with foo() { .. }

- wrap some long lines

- add lsof and /proc/fd magic so that we can find the sourced file even in dash

- only do the complicated shell checks in one place; test $_sp_shell
  elsewhere.

iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack