Skip to content

Instantly share code, notes, and snippets.

@Zeioth
Created March 19, 2020 19:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zeioth/c592b7fac6973a9cb8fdbeb812efcfea to your computer and use it in GitHub Desktop.
Save Zeioth/c592b7fac6973a9cb8fdbeb812efcfea to your computer and use it in GitHub Desktop.
# This small script will replace 'Arch mirrors' by 'Manjaro mirrors' on any arch distro.
# It can be easily reverted, and there's no risk involved.
# Author: Zeioth
# BLOCK A - Download pacman-mirror from gitlab: https://gitlab.manjaro.org/packages/core/pacman-mirrors
git clone https://gitlab.manjaro.org/packages/core/pacman-mirrors.git
sudo pacman -S python-npyscreen
cd ~/pacman-mirrors && paco-make &&rm R ~/pacman-mirrors
# BLOCK B - Install Manjaro's gpg signatures: https://gitlab.manjaro.org/packages/core/manjaro-keyring
git clone https://gitlab.manjaro.org/packages/core/manjaro-keyring.git
cd ~/manjaro-keyring && paco-make && rm R ~/manjaro-keyring
sudo pacman-key --populate manjaro
sudo pacman -Syu && sudo pacman-key --refresh-keys
# Optimize mirrors (full doc: https://wiki.manjaro.org/index.php?title=Pacman-mirrors#Pacman-Mirrors)
# It will ask us to downgrade unstable packages.
sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
# Install the stable version of pacman-mirrors (just in case)
sudo pacman -S pacman-mirrors
# Notify about manual steps
echo "You must manually edit /etc/pacman.conf and add the next line under [options]. Then update the mirrors.""
"SyncFirst = manjaro-system archlinux-keyring manjaro-keyring"
"sudo pacman -Syy"
# COMMENTS:
# A: You can go back to pure arch repos easily with the command 'sudo pacman-mirrors --api --set-branch {branch}'
# B: You can also purge all the previous packages and install 'reflect instead'. It works Like pacman-mirrorlist, but for pure arch official mirrors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment