mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2025-01-18 07:43:44 +01:00
Make MinIO instance a positional argument
This commit is contained in:
parent
b97f1879c6
commit
db40009692
@ -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}/"
|
||||||
|
Loading…
Reference in New Issue
Block a user