Reorder variable assignment to fix bugs (openwrt_staging not assigned)
Ensure variables are assigned
Create output directory if needed
Use sudo for make install (script won't be run as sudo)
Do not run cross_compile_bfgminer.sh with sudo
Warn / error on unassigned variables
Bump versions
Bump the image version from pr4 to r1