Make MinIO instance a positional argument

This commit is contained in:
Jeffrey Serio 2024-12-01 11:02:16 -06:00
parent b97f1879c6
commit db40009692

View File

@ -3,8 +3,8 @@
set -euo pipefail set -euo pipefail
# If the number of arguments is not equal to 1, exit and display usage info. # If the number of arguments is not equal to 1, exit and display usage info.
if [ "$#" -ne 1 ]; then if [ "$#" -ne 2 ]; then
echo "Usage: archive_index_template BUCKET_NAME" echo "Usage: archive_index_template MINIO_INSTANCE BUCKET_NAME"
exit 1 exit 1
fi fi
@ -35,4 +35,4 @@ wget --quiet https://files.hyperreal.coffee/archive-index-template.html \
sed -i "s/CHANGEME/$1/g" "${TMP_DIR}/index.html" sed -i "s/CHANGEME/$1/g" "${TMP_DIR}/index.html"
# Put the new index.html into the root of the given bucket. # Put the new index.html into the root of the given bucket.
mc put "${TMP_DIR}/index.html" "minio/${1}/" mc put "${TMP_DIR}/index.html" "${1}/${2}/"