Make sure LIB_CACHE exists before creating temp dir inside it (#13035)

Fixes Drone breakage.

#9160
This commit is contained in:
Alan Parra 2022-05-31 16:22:17 -03:00 committed by GitHub
parent e8bfe2c931
commit 1af3c11acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,7 @@ fetch_and_build() {
local buildcmd="$4" # eg, cbor_build, a bash function name
echo "$name: fetch and build" >&2
mkdir -p "$LIB_CACHE"
local tmp=''
tmp="$(mktemp -d "$LIB_CACHE/build.XXXXXX")"
# Early expansion on purpose.
@ -49,7 +50,6 @@ fetch_and_build() {
-exec sed -i '' "s@$install_path@$dest@g" {} +
# Check if another builder beat us. Builds _should_ be equivalent.
mkdir -p "$LIB_CACHE"
if [[ ! -d "$dest" ]]; then
echo "$name: moving $fullname to $dest" >&2
mv "$install_path" "$dest"