Skip to content

Commit

Permalink
varexpansion
Browse files Browse the repository at this point in the history
  • Loading branch information
abutbul committed Jan 29, 2022
1 parent 39efa79 commit 6e2cf64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
if [[ ! -f $BBS_ROOT_DIR/config/$CONFIG_NAME ]]; then
for DIR in "${PRE_POPULATED_VOLUMES[@]}"
for VOLUME in "${PRE_POPULATED_VOLUMES[@]}"
do
if [ -n "$(find "$BBS_ROOT_DIR/$DIR" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
cp -rp $BBS_STAGING_PATH/$DIR/* $BBS_ROOT_DIR/$DIR/
if [ -n "$(find "$BBS_ROOT_DIR/$VOLUME" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
cp -rp $BBS_STAGING_PATH/$VOLUME/* $BBS_ROOT_DIR/$VOLUME/
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"
fi
done
Expand Down

0 comments on commit 6e2cf64

Please sign in to comment.