With some help from Don_crissti over at www.linuxgator.org
I've put together a zenity (GUI) / bash script to run a speed test on all of the official PCLinuxOS repositories, display the results to the user, and then let the user pick which repository should be their default repository.
Once the user picks a repository the sources.list file is re-written with all of the other "good" repositories disabled, and only the user selected repo enabled (repos that don't time out during the speed test, or are not older than the user defined age are considered good). Local and pass repos are preserved from the current sources.list file, but are disabled; the current sources.list is backed up in /etc/apt before the new one is written.
So far it seems to work pretty well, but I wanted some feedback on one aspect of the GUI.. do you like the pulsating progress indicator, or the (more useful) percentage progress indicator?
I've attached two copies if the script below.. one to demonstrate each indicator. Please test and VOTE!
The final version will be determined by you.. the users! EDIT:
I have locked the poll.. It seems the over-whelming majority like the progress bar to indicate the percent completed.
Also, by popular request the following changes have been made:
--re-writing of the existing /etc/apt/sources.list file requires a command line switch (off by default)
--files are saved in the user's home directory
--user can select the number of public on-line repo's to keep in the new sources.list file
--local and pass repos from the old sources.list are added to the top of the new sources.list file
--local "localhost" and lan ip repo's are also now preserved
The new version is attached below.. Please test and post your feedback!
Available console options to override default behavior include:.
-a, -age=<time in days> Allowed repo age before FAIL
-n, -number=<number of repos> Max number of official repos to keep (fastest)
-s, -sources=<url of file> Location of official online sources.list
-t, -timeout=<time in seconds> Time to start file download before FAIL
-v, -verbose Verbose output for debugging
-w, -write Prompt to write new sources.list to /etc/apt (root password)
-u, -usage Display sample command line usage, help
-h, -help Display this help message
[attachment deleted by admin]