fix: database location
Founded a major mistake: db overwrites during install. Now all scripts save db in special folder and don't overwrite it.
This commit is contained in:
@@ -103,6 +103,7 @@ case "$1" in
|
||||
--exclude='.env.test.local' \
|
||||
--exclude='*.md' \
|
||||
--exclude='.dependencies.hash' \
|
||||
--exclude='db/' \
|
||||
"$PROJECT_DIR/" "$INSTALL_DIR/"
|
||||
|
||||
# Handle .env file (preserve existing if present)
|
||||
@@ -113,6 +114,15 @@ case "$1" in
|
||||
cp "$PROJECT_DIR/.env" "$INSTALL_DIR/.env"
|
||||
fi
|
||||
|
||||
# Убеждаемся, что папка db существует и не перезаписывается
|
||||
if [ ! -d "$INSTALL_DIR/db" ]; then
|
||||
echo -e "${YELLOW}Creating db directory for database...${NC}"
|
||||
mkdir -p "$INSTALL_DIR/db"
|
||||
chmod 755 "$INSTALL_DIR/db"
|
||||
else
|
||||
echo -e "${GREEN}Database directory exists, preserving existing database${NC}"
|
||||
fi
|
||||
|
||||
# Change to installation directory for build
|
||||
cd "$INSTALL_DIR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user