Battling with repository still.
This commit is contained in:
		@@ -28,18 +28,11 @@ attention() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_stormux_repo() {
 | 
					add_stormux_repo() {
 | 
				
			||||||
    # Check if StormUX repository is already configured correctly
 | 
					    # Check if StormUX repository is already configured
 | 
				
			||||||
    if grep -q "aarch64.stormux.org/\$repo-\$arch" /etc/pacman.conf; then
 | 
					    if grep -q "aarch64.stormux.org" /etc/pacman.conf; then
 | 
				
			||||||
        return 0
 | 
					        return 0
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # Check if old format exists and needs fixing
 | 
					 | 
				
			||||||
    local needs_fixing=false
 | 
					 | 
				
			||||||
    if grep -q "aarch64.stormux.org" /etc/pacman.conf && ! grep -q "aarch64.stormux.org/\$repo-\$arch" /etc/pacman.conf; then
 | 
					 | 
				
			||||||
        needs_fixing=true
 | 
					 | 
				
			||||||
        infobox "Updating StormUX repository configuration..."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    infobox "Adding StormUX repository and importing signing key..."
 | 
					    infobox "Adding StormUX repository and importing signing key..."
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # Import the repository signing key
 | 
					    # Import the repository signing key
 | 
				
			||||||
@@ -60,25 +53,11 @@ add_stormux_repo() {
 | 
				
			|||||||
    local added_repo=false
 | 
					    local added_repo=false
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    while IFS= read -r line; do
 | 
					    while IFS= read -r line; do
 | 
				
			||||||
        # Skip existing stormux repository entries if we're fixing them
 | 
					 | 
				
			||||||
        if [[ "$needs_fixing" == true ]] && [[ "$line" =~ ^\[stormux\]$ ]]; then
 | 
					 | 
				
			||||||
            # Skip the [stormux] line and the next lines until we hit an empty line or another section
 | 
					 | 
				
			||||||
            while IFS= read -r skip_line && [[ -n "$skip_line" ]] && [[ ! "$skip_line" =~ ^\[.*\]$ ]]; do
 | 
					 | 
				
			||||||
                continue
 | 
					 | 
				
			||||||
            done
 | 
					 | 
				
			||||||
            # Put back the line we read (if it's a section header)
 | 
					 | 
				
			||||||
            if [[ "$skip_line" =~ ^\[.*\]$ ]]; then
 | 
					 | 
				
			||||||
                line="$skip_line"
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                continue
 | 
					 | 
				
			||||||
            fi
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        # Add StormUX repo before any AUR or custom repo sections
 | 
					        # Add StormUX repo before any AUR or custom repo sections
 | 
				
			||||||
        if [[ "$line" =~ ^\[.*\]$ ]] && [[ ! "$line" =~ ^\[(core|extra|multilib|testing|multilib-testing)\]$ ]] && [[ "$added_repo" == false ]]; then
 | 
					        if [[ "$line" =~ ^\[.*\]$ ]] && [[ ! "$line" =~ ^\[(core|extra|multilib|testing|multilib-testing)\]$ ]] && [[ "$added_repo" == false ]]; then
 | 
				
			||||||
            echo "[stormux]" >> "$temp_conf"
 | 
					            echo "[stormux]" >> "$temp_conf"
 | 
				
			||||||
            echo "SigLevel = Required" >> "$temp_conf"
 | 
					            echo "SigLevel = Required" >> "$temp_conf"
 | 
				
			||||||
            echo "Server = https://aarch64.stormux.org/\$repo-\$arch" >> "$temp_conf"
 | 
					            echo "Server = https://aarch64.stormux.org/" >> "$temp_conf"
 | 
				
			||||||
            echo "" >> "$temp_conf"
 | 
					            echo "" >> "$temp_conf"
 | 
				
			||||||
            added_repo=true
 | 
					            added_repo=true
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user