lowRISC / lowrisc-chip

The root repo for lowRISC project and FPGA demos.
http://www.lowrisc.org/
Other
596 stars 148 forks source link

Various fixes to set_env.sh #11

Closed asb closed 8 years ago

asb commented 8 years ago

The primary issue was that [ ! -d $UNDEFVAR ] is always false, meaning that $TOP wouldn't be set. I've adjusted the conditional and also taken the opportunity to ensure that all arguments to [ are quoted, to avoid issues in the cases the directory contains a space. Additionally, I've reformatted the opensocdebug related lines to use more conventional indentation which matches the rest of the file.

asb commented 8 years ago

As discussed, I've now avoided quoting shell variables, as this would only fix issues in this script but would lead to other less obvious problems down the line. Please re-review, I've edited and re-pushed.