developer: Fix build.sh install failing when no PREFIX/bin dir

This commit is contained in:
Ethan P 2020-12-03 04:40:34 -08:00
parent 0d9468e1cf
commit eb69d61ff8
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA

View File

@ -424,13 +424,20 @@ fi
# -----------------------------------------------------------------------------
# Check for resources.
[[ -d "$BIN" ]] || mkdir "$BIN"
if ! will_minify none && ! command -v shfmt &>/dev/null; then
printc_err "%{RED}Warning: cannot find shfmt. Unable to minify scripts.%{CLEAR}\n"
OPT_MINIFY=none
fi
# -----------------------------------------------------------------------------
# Check target directories exist.
[[ -d "$BIN" ]] || mkdir -p "$BIN"
if "$OPT_INSTALL"; then
[[ -d "${OPT_PREFIX}/bin" ]] || mkdir -p "${OPT_PREFIX}/bin"
fi
# -----------------------------------------------------------------------------
# Find files.