<commit_before>set +x
# First start?? Check if something exists that indicates that environment is not new.. Config file? Something in DB maybe??

echo "Initialization: Check if files already exist, export otherwise."
if [ ! -d  "$EXPORT_DIR/$GALAXY_ROOT" ]; then
    # Create initial $GALAXY_ROOT in $EXPORT_DIR
    mkdir $EXPORT_DIR/$GALAXY_ROOT
fi

if [ ! -d  "$EXPORT_DIR/$GALAXY_CONFIG_DIR" ] || [ -z "$(ls -p $EXPORT_DIR/$GALAXY_CONFIG_DIR | grep -v /)" ]; then
    # Move config to $EXPORT_DIR and create symlink 
    mkdir $EXPORT_DIR/$GALAXY_CONFIG_DIR
    cp -rfv $GALAXY_CONFIG_DIR/* $EXPORT_DIR/$GALAXY_CONFIG_DIR
    cp -rfv $GALAXY_CONFIG_DIR/plugins/* $EXPORT_DIR/$GALAXY_CONFIG_DIR/plugins
fi
rm -rf $GALAXY_CONFIG_DIR
ln -v -s $EXPORT_DIR/$GALAXY_CONFIG_DIR $GALAXY_CONFIG_DIR

if [ ! -d  "$EXPORT_DIR/$GALAXY_STATIC_DIR" ] || [ -z "$(ls -A $EXPORT_DIR/$GALAXY_STATIC_DIR)" ]; then
    # Move static to $EXPORT_DIR and create symlink
    cp -rfv $GALAXY_STATIC_DIR/* $EXPORT_DIR/$GALAXY_STATIC_DIR
fi
rm -rf $GALAXY_STATIC_DIR
ln -v -s $EXPORT_DIR/$GALAXY_STATIC_DIR $GALAXY_STATIC_DIR

if [ ! -d  "$EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH" ] || [ -z "$(ls -A $EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH)" ]; then
    # Move environment to export and create symlink
    mkdir $EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH
    cp -rfv $GALAXY_CONFIG_TOOL_PATH/* $EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH
fi
rm -rf $GALAXY_CONFIG_TOOL_PATH<commit_msg>Fix start.sh<commit_after>set +x
# First start?? Check if something exists that indicates that environment is not new.. Config file? Something in DB maybe??

echo "Initialization: Check if files already exist, export otherwise."
if [ ! -d  "$EXPORT_DIR/$GALAXY_ROOT" ]; then
    # Create initial $GALAXY_ROOT in $EXPORT_DIR
    mkdir $EXPORT_DIR/$GALAXY_ROOT
fi

if [ ! -d  "$EXPORT_DIR/$GALAXY_CONFIG_DIR" ] || [ -z "$(ls -p $EXPORT_DIR/$GALAXY_CONFIG_DIR | grep -v /)" ]; then
    # Move config to $EXPORT_DIR and create symlink 
    mkdir $EXPORT_DIR/$GALAXY_CONFIG_DIR
    cp -rfv $GALAXY_CONFIG_DIR/* $EXPORT_DIR/$GALAXY_CONFIG_DIR
    cp -rfv $GALAXY_CONFIG_DIR/plugins/* $EXPORT_DIR/$GALAXY_CONFIG_DIR/plugins
fi
rm -rf $GALAXY_CONFIG_DIR
ln -v -s $EXPORT_DIR/$GALAXY_CONFIG_DIR $GALAXY_CONFIG_DIR

if [ ! -d  "$EXPORT_DIR/$GALAXY_STATIC_DIR" ] || [ -z "$(ls -A $EXPORT_DIR/$GALAXY_STATIC_DIR)" ]; then
    # Move static to $EXPORT_DIR and create symlink
    mkdir $EXPORT_DIR/$GALAXY_STATIC_DIR
    cp -rfv $GALAXY_STATIC_DIR/* $EXPORT_DIR/$GALAXY_STATIC_DIR
fi
rm -rf $GALAXY_STATIC_DIR
ln -v -s $EXPORT_DIR/$GALAXY_STATIC_DIR $GALAXY_STATIC_DIR

if [ ! -d  "$EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH" ] || [ -z "$(ls -A $EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH)" ]; then
    # Move environment to export and create symlink
    mkdir $EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH
    cp -rfv $GALAXY_CONFIG_TOOL_PATH/* $EXPORT_DIR/$GALAXY_CONFIG_TOOL_PATH
fi
rm -rf $GALAXY_CONFIG_TOOL_PATH
{'fraction_non_alphanumeric': 0.11567419575633128, 'fraction_numerical': 0.0, 'mean_word_length': 4.535984848484849, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7472748', 'n_tokens_mistral': 1215, 'n_tokens_neox': 1092, 'n_words': 264}