1 2 3 4
#!/bin/bash # Choose mirror from the kernel command line grep -qoP 'mirror=\K\S+' /proc/cmdline && /usr/local/bin/choose-mirror