forked from p15670423/monkey
Added error handling for pushd failing.
This commit is contained in:
parent
fe97a8f8e3
commit
98018251ac
|
@ -26,7 +26,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TEMP_MONGO=$(mktemp -d)
|
TEMP_MONGO=$(mktemp -d)
|
||||||
pushd "${TEMP_MONGO}"
|
pushd "${TEMP_MONGO}" || {
|
||||||
|
echo "Pushd failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
if exists bash; then
|
if exists bash; then
|
||||||
wget ${tgz_url} -O mongodb.tgz
|
wget ${tgz_url} -O mongodb.tgz
|
||||||
|
@ -40,7 +43,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tar -xf mongodb.tgz
|
tar -xf mongodb.tgz
|
||||||
popd
|
popd || {
|
||||||
|
echo "popd failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
mkdir -p "${MONGODB_DIR}"/bin
|
mkdir -p "${MONGODB_DIR}"/bin
|
||||||
mkdir -p "${MONGODB_DIR}"/db
|
mkdir -p "${MONGODB_DIR}"/db
|
||||||
|
|
Loading…
Reference in New Issue