From dacd469aa9e1a1c872ca20eed37da2c8c99faa38 Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Sat, 4 Jan 2020 22:39:34 +0200 Subject: [PATCH] Double quote to prevent globbing --- monkey/monkey_island/linux/install_mongo.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/monkey/monkey_island/linux/install_mongo.sh b/monkey/monkey_island/linux/install_mongo.sh index 0aaacc490..0d720fe15 100755 --- a/monkey/monkey_island/linux/install_mongo.sh +++ b/monkey/monkey_island/linux/install_mongo.sh @@ -25,16 +25,17 @@ else fi TEMP_MONGO=$(mktemp -d) -pushd ${TEMP_MONGO} +pushd "${TEMP_MONGO}" wget ${tgz_url} -O mongodb.tgz tar -xf mongodb.tgz popd -mkdir -p ${MONGODB_DIR}/bin -mkdir -p ${MONGODB_DIR}/db -cp ${TEMP_MONGO}/mongodb-*/bin/mongod ${MONGODB_DIR}/bin/mongod -cp ${TEMP_MONGO}/mongodb-*/LICENSE-Community.txt ${MONGODB_DIR}/ -chmod a+x ${MONGODB_DIR}/bin/mongod +mkdir -p "${MONGODB_DIR}"/bin +mkdir -p "${MONGODB_DIR}"/db +cp "${TEMP_MONGO}"/mongodb-*/bin/mongod "${MONGODB_DIR}"/bin/mongod +cp "${TEMP_MONGO}"/mongodb-*/LICENSE-Community.txt "${MONGODB_DIR}"/ +chmod a+x "${MONGODB_DIR}"/bin/mongod +# shellcheck disable=SC2086 rm -r ${TEMP_MONGO} exit 0 \ No newline at end of file