From db40009692f1996c62be01637edf69a1c7ec3b9b Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Sun, 1 Dec 2024 11:02:16 -0600 Subject: [PATCH] Make MinIO instance a positional argument --- shell/archive_index_template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/archive_index_template b/shell/archive_index_template index 00e8b2e..aebcdff 100755 --- a/shell/archive_index_template +++ b/shell/archive_index_template @@ -3,8 +3,8 @@ set -euo pipefail # If the number of arguments is not equal to 1, exit and display usage info. -if [ "$#" -ne 1 ]; then - echo "Usage: archive_index_template BUCKET_NAME" +if [ "$#" -ne 2 ]; then + echo "Usage: archive_index_template MINIO_INSTANCE BUCKET_NAME" exit 1 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" # 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}/"