varexpansion

This commit is contained in:
David Abutbul 2022-01-29 21:28:14 +02:00 committed by GitHub
parent 39efa79743
commit 6e2cf64843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -9,12 +9,12 @@ CONFIG_NAME=config.hjson # This is the default name, this script is intended for
# Setup happens when there is no existing config file # Setup happens when there is no existing config file
if [[ ! -f $BBS_ROOT_DIR/config/$CONFIG_NAME ]]; then if [[ ! -f $BBS_ROOT_DIR/config/$CONFIG_NAME ]]; then
for DIR in "${PRE_POPULATED_VOLUMES[@]}" for VOLUME in "${PRE_POPULATED_VOLUMES[@]}"
do do
if [ -n "$(find "$BBS_ROOT_DIR/$DIR" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then if [ -n "$(find "$BBS_ROOT_DIR/$VOLUME" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
cp -rp $BBS_STAGING_PATH/$DIR/* $BBS_ROOT_DIR/$DIR/ cp -rp $BBS_STAGING_PATH/$VOLUME/* $BBS_ROOT_DIR/$VOLUME/
else else
printf "WARN: skipped $BBS_ROOT_DIR/$DIR: Volume not empty or not a new setup; Files required to run ENiGMA 1/2 may be missing.\n Possible bad state\n" printf "WARN: skipped $BBS_ROOT_DIR/$VOLUME: Volume not empty or not a new setup; Files required to run ENiGMA 1/2 may be missing.\n Possible bad state\n"
printf "INFO: You have mounted folders with existing data - but no existing config json.\n\nPossible solutions:\n1. Make sure all volumes are set correctly specifically config volume... \n2. Check your configuration name if non-default\n\n\n" printf "INFO: You have mounted folders with existing data - but no existing config json.\n\nPossible solutions:\n1. Make sure all volumes are set correctly specifically config volume... \n2. Check your configuration name if non-default\n\n\n"
fi fi
done done