mybash icon indicating copy to clipboard operation
mybash copied to clipboard

One script to rule them all. Arch support

Open joser93 opened this issue 3 years ago • 0 comments

I thought that having a separated setup file just for arch, can be improved and have a single script that can be run in any distro base and the only thing left for everyone, it's to customize the bashrc file as they wish. So, I was trying to archive this and maybe this is a good solution.

My changes in details.

  1. I removed all the which commands usages because which is not installed by default on a minimal arch install VM, it's installed as a dependency for other package, but also has some inconsistency of checking if a program is available with the latest version. At line 667 https://cvs.savannah.gnu.org/viewvc/which/which/which.c?view=markup#l667 makes a stderr output when a program is not found, instead of no output that other distros have it by default. So, searching for a more wide supported way to do the same thing, I found that 'command' is one way to go. I include some stackoverflow posts that I got for it. https://stackoverflow.com/questions/592620/how-can-i-check-if-a-program-exists-from-a-bash-script https://stackoverflow.com/questions/36715138/how-to-check-if-command-v-1-dev-null-21-is-false

  2. Allow yay to be installed using the script and make sure that autojump can be installed using the AUR. The installation process is based on the git documentation and also moving the files to be used into the /opt directory.

  3. No sudo for yay command, for some reason, when tries to install autojump, fails because a permission denied error. Also, yay prompts a message that is not recommended to use with sudo.

  4. Add --noconfirm flag to pacman and yay commands. Archives the same when using -y with apt or dnf commands.

Tested on the latest Archlinux VM and also tested with the Fedora VM that I have, just to make sure to not break anything.

joser93 avatar Nov 10 '22 07:11 joser93