mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
Consistently quote $@, check for argument
Also add $@ to a couple commands, and add a check for the argument to the CORS command since it's required
This commit is contained in:
parent
8eb340945b
commit
37a7899f6f
1 changed files with 10 additions and 3 deletions
13
bw-dev
13
bw-dev
|
@ -131,7 +131,7 @@ case "$CMD" in
|
|||
makeitblack
|
||||
;;
|
||||
populate_streams)
|
||||
runweb python manage.py populate_streams $@
|
||||
runweb python manage.py populate_streams "$@"
|
||||
;;
|
||||
populate_suggestions)
|
||||
runweb python manage.py populate_suggestions
|
||||
|
@ -140,7 +140,7 @@ case "$CMD" in
|
|||
runweb python manage.py generateimages
|
||||
;;
|
||||
generate_preview_images)
|
||||
runweb python manage.py generate_preview_images $@
|
||||
runweb python manage.py generate_preview_images "$@"
|
||||
;;
|
||||
copy_media_to_s3)
|
||||
awscommand "bookwyrm_media_volume:/images"\
|
||||
|
@ -155,11 +155,18 @@ case "$CMD" in
|
|||
--acl public-read" "$@"
|
||||
;;
|
||||
set_cors_to_s3)
|
||||
set +x
|
||||
config_file=$1
|
||||
if [ -z "$config_file" ]; then
|
||||
echo "This command requires a JSON file containing a CORS configuration as an argument"
|
||||
exit 1
|
||||
fi
|
||||
set -x
|
||||
awscommand "$(pwd):/bw"\
|
||||
"s3api put-bucket-cors\
|
||||
--bucket ${AWS_STORAGE_BUCKET_NAME}\
|
||||
--endpoint-url ${AWS_S3_ENDPOINT_URL}\
|
||||
--cors-configuration file:///bw/$@"
|
||||
--cors-configuration file:///bw/$config_file" "$@"
|
||||
;;
|
||||
runweb)
|
||||
runweb "$@"
|
||||
|
|
Loading…
Reference in a new issue