stdenv: Fix possible issues discovered with

```
set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit
```

in `stdenv/default-builder.sh`

Artturin 1db1e3c4 9816ca55

+4 -4
+2 -2
pkgs/build-support/setup-hooks/multiple-outputs.sh
··· 69 69 # try to detect share/doc/${shareDocName} 70 70 # Note: sadly, $configureScript detection comes later in configurePhase, 71 71 # and reordering would cause more trouble than worth. 72 - if [ -z "$shareDocName" ]; then 73 - local confScript="$configureScript" 72 + if [ -z "${shareDocName:-}" ]; then 73 + local confScript="${configureScript:-}" 74 74 if [ -z "$confScript" ] && [ -x ./configure ]; then 75 75 confScript=./configure 76 76 fi
+1 -1
pkgs/build-support/setup-hooks/patch-shebangs.sh
··· 53 53 read -r oldInterpreterLine < "$f" 54 54 read -r oldPath arg0 args <<< "${oldInterpreterLine:2}" 55 55 56 - if [[ -z "$pathName" ]]; then 56 + if [[ -z "${pathName:-}" ]]; then 57 57 if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then 58 58 pathName=HOST_PATH 59 59 else
+1 -1
pkgs/stdenv/generic/setup.sh
··· 1216 1216 done 1217 1217 1218 1218 sed -i "$1" \ 1219 - -e "s^eval \(sys_lib_search_path=\).*^\1'$search_path'^" \ 1219 + -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" \ 1220 1220 -e 's^eval sys_lib_.+search_path=.*^^' 1221 1221 } 1222 1222