=====================================================================

--- Bug fixes ----------------------------

- fixed variable reference in media-sync

- fixed bug with multi-line list environment variables sometimes gets
  appended to a previous variable line
This commit is contained in:
Wryn (yage) Wagner 2023-06-22 15:48:57 -06:00
parent 76a746a53e
commit a94d6bc197
4 changed files with 12 additions and 6 deletions

View File

@ -3,8 +3,6 @@ export AWS_ACCOUNT=
export AWS_PROFILE=
export AWS_REGION=
export AWS__EFS__LOCAL_MOUNT_POINT=
export AWS__S3__MEDIA_BUCKET=
export AWS__S3__MEDIA_TARGETS=
export DIRECTUS__API_TOKEN=
export DIRECTUS__BASE_URL=
export DISCORD__BOT_TOKEN=
@ -15,6 +13,8 @@ export I3__DMENU_FONT_SIZE=
export I3__GLOBAL_FONT_SIZE=
export I3__MODEL_CONFIG=
export LINEAR__API_TOKEN=
export MEDIA_SYNC__S3_BUCKET
export MEDIA_SYNC__TARGETS
export REDIS_AUTH=
export REDIS_HOST=
export REDIS_PORT=

View File

@ -4,9 +4,6 @@ AWS_REGION |
AWS__EFS__LOCAL_MOUNT_POINT | fully-qualified path to mount the EFS drive
AWS__S3__MEDIA_BUCKET | s3 bucket name and filesystem targets for media backups
AWS__S3__MEDIA_TARGETS |
DIRECTUS__API_TOKEN | details for a directus instance
DIRECTUS__BASE_URL |
@ -21,6 +18,9 @@ I3__MODEL_CONFIG |
LINEAR__API_TOKEN | linear.app project management configuration
MEDIA_SYNC__S3_BUCKET | s3 bucket name and filesystem targets for media backups
MEDIA_SYNC__TARGETS |
REDIS_AUTH | redis connection credentials
REDIS_HOST |
REDIS_PORT |

5
run
View File

@ -217,6 +217,11 @@ __RUN() {
export ENV_NAME
}
for f in $(eval 'echo $SCWRYPTS_STATIC_CONFIG__'$SCWRYPT_GROUP)
do
source "$f" || FAIL 5 "invalid static config '$f'"
done
##########################################
[ ! $SUBSCWRYPT ] \

View File

@ -119,7 +119,7 @@ ADD_LINES() {
do
VARIABLE=$(echo $LINE | sed 's/=.*$//')
echo $CONTENT | grep -qi "^$VARIABLE" || {
echo $LINE | grep -qi '__[a-z_]\+=' || {
echo $LINE | grep -q '__[a-z_]\+=' || {
WARNING "skipping variable $(echo $LINE | sed 's/^export //; s/=.*//')
(must be included in a template before it can be added)"
continue
@ -142,6 +142,7 @@ READ_POPULATED_VARIABLES() {
| awk '/^[^=]+$/{printf "%s_____",$0;next}7' \
| sed 's/\(_____\)\(export\)/\1\n\2/; s/\(_____\)$/\1\n/' \
| sed 's/^.*_____.*$/_____&/' \
| sed 's/^_____export/export/' \
| sed -z 's/[\n ] *_____/_____/g' \
| grep -v '^$' \
;