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_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}" \
|
2024-08-17 02:50:27 +00:00
|
|
|
-o ${FROSTFS_CLI_FILE}
|
|
|
|
@chmod +x ${FROSTFS_CLI_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
|