2021-12-19 21:32:19 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#!/bin/bash
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# File: find-mirrors
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-20 20:03:01 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-19 21:32:19 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Description: This file generates a pacman mirrorlist to ensure hosts use the right mirrors for performance.
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-20 20:03:01 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-19 21:32:19 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Package: AniNIX::Foundation/HelloWorld
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Copyright: WTFPL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Author: DarkFeather <ircs://aninix.net:6697/DarkFeather>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								country="United States"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-20 20:03:01 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								curl -s https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/pacman-mirrorlist/trunk/mirrorlist | awk '/^## '"$country"'$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' | sed 's/^#Server/Server/' > /tmp/mirrorlist
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-19 21:32:19 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								rankmirrors -n 6 /tmp/mirrorlist > files/mirrorlist
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								rm /tmp/mirrorlist
							 |