2022-12-21 12:34:14 +00:00
|
|
|
# Get FrostFS IR artifacts (LOCODE database and FrostFS CLI)
|
2021-02-09 15:57:37 +00:00
|
|
|
|
|
|
|
LOCODE_DB_ARCHIVE_PATH=./vendor
|
|
|
|
LOCODE_DB_ARCHIVE_FILE=locode_db.gz
|
|
|
|
|
2021-06-29 19:27:54 +00:00
|
|
|
get.ir: get.locode get.cli
|
|
|
|
|
2022-12-21 12:34:14 +00:00
|
|
|
# Get FrostFS LOCODE database
|
2021-06-29 19:27:54 +00:00
|
|
|
get.locode: LOCODE_DB_PATH?=
|
|
|
|
get.locode:
|
2021-02-09 15:57:37 +00:00
|
|
|
@mkdir -p ${LOCODE_DB_ARCHIVE_PATH}
|
|
|
|
|
|
|
|
ifeq (${LOCODE_DB_PATH},)
|
2022-12-21 12:34:14 +00:00
|
|
|
@echo "⇒ Download FrostFS LOCODE database from ${LOCODE_DB_URL}"
|
2021-02-09 15:57:37 +00:00
|
|
|
@curl \
|
|
|
|
-sSL "${LOCODE_DB_URL}" \
|
|
|
|
-o ${LOCODE_DB_ARCHIVE_PATH}/${LOCODE_DB_ARCHIVE_FILE}
|
|
|
|
else
|
2022-12-21 12:34:14 +00:00
|
|
|
@echo "⇒ Copy local archive of FrostFS LOCODE database from ${LOCODE_DB_PATH}"
|
2021-02-09 15:57:37 +00:00
|
|
|
@cp ${LOCODE_DB_PATH} ${LOCODE_DB_ARCHIVE_PATH}/${LOCODE_DB_ARCHIVE_FILE}
|
|
|
|
endif
|
|
|
|
|
|
|
|
gzip -dfk ${LOCODE_DB_ARCHIVE_PATH}/${LOCODE_DB_ARCHIVE_FILE}
|
2021-06-29 19:27:54 +00:00
|
|
|
|
2022-12-21 12:34:14 +00:00
|
|
|
# Download FrostFS CLI
|
2021-06-29 19:27:54 +00:00
|
|
|
.ONESHELL:
|
2022-12-21 12:34:14 +00:00
|
|
|
get.cli: FROSTFS_CLI_FILE=./vendor/frostfs-cli
|
|
|
|
get.cli: FROSTFS_CLI_ARCHIVE_FILE=${FROSTFS_CLI_FILE}.tar.gz
|
|
|
|
get.cli: FROSTFS_CLI_PATH?=
|
2021-06-29 19:27:54 +00:00
|
|
|
get.cli:
|
|
|
|
@mkdir -p ./vendor
|
|
|
|
|
2022-12-21 12:34:14 +00:00
|
|
|
ifeq (${FROSTFS_CLI_PATH},)
|
|
|
|
@echo "⇒ Download FrostFS CLI binary from ${FROSTFS_CLI_URL}"
|
2021-06-29 19:27:54 +00:00
|
|
|
@curl \
|
2023-01-10 13:05:29 +00:00
|
|
|
-ksSL "${FROSTFS_CLI_URL}" \
|
2022-12-21 12:34:14 +00:00
|
|
|
-o ${FROSTFS_CLI_ARCHIVE_FILE}
|
|
|
|
@tar -xvf ${FROSTFS_CLI_ARCHIVE_FILE} -C ./vendor | xargs -I {} \
|
|
|
|
mv ./vendor/{} ${FROSTFS_CLI_FILE}
|
|
|
|
@rm ${FROSTFS_CLI_ARCHIVE_FILE}
|
2021-06-29 19:27:54 +00:00
|
|
|
else
|
2022-12-21 12:34:14 +00:00
|
|
|
@echo "⇒ Copy local binary from ${FROSTFS_CLI_PATH}"
|
|
|
|
@cp ${FROSTFS_CLI_PATH} ${FROSTFS_CLI_FILE}
|
2021-06-29 19:27:54 +00:00
|
|
|
endif
|