massive improvement

This commit is contained in:
2025-03-04 22:28:11 +00:00
parent d1483ce581
commit 1b97e3ba68
21 changed files with 7152 additions and 1611 deletions
+13 -3
View File
@@ -28,12 +28,22 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# Create modules directory if it doesn't exist
mkdir -p "${SCRIPT_DIR}/modules"
# Check for installation type
IS_UPDATE=false
if [ -f "${SCRIPT_DIR}/config.json" ]; then
IS_UPDATE=true
echo -e "${YELLOW}Existing installation detected. Running in update mode.${NC}"
echo -e "${GREEN}Your existing configuration will be preserved.${NC}"
else
echo -e "${GREEN}Fresh installation. Will create new configuration.${NC}"
fi
# Check if modules exist, if not, extract them
if [ ! -f "${SCRIPT_DIR}/modules/config.sh" ]; then
if [ ! -f "${SCRIPT_DIR}/modules/config-module.sh" ]; then
echo -e "${YELLOW}Creating module files...${NC}"
# Create config module
cat > "${SCRIPT_DIR}/modules/config.sh" << 'EOL'
cat > "${SCRIPT_DIR}/modules/config-module.sh" << 'EOL'
#!/bin/bash
# Configuration module for Transmission RSS Manager Installation
@@ -173,7 +183,7 @@ EOF
EOL
# Create utils module
cat > "${SCRIPT_DIR}/modules/utils.sh" << 'EOL'
cat > "${SCRIPT_DIR}/modules/utils-module.sh" << 'EOL'
#!/bin/bash
# Utilities module for Transmission RSS Manager Installation