Bash script to install zsh on different distributions
if [[ $NAME = &quot;Fedora&quot; ]]; then
elif [[ $NAME = &quot;void&quot; ]]; then
elif [[ $NAME = &quot;Debian&quot; ]] || [[ $NAME = &quot;Ubuntu&quot; ]] || [[ $NAME = &quot;Linux Mint&quot; ]]; then


That looks like a candidate for case &quot;$NAME&quot; in.  However, instead of changing that, let's look at what we're doing:

if [[ $NAME = &quot;Fedora&quot; ]]
then
   dnf install -y git zsh zsh-autosuggestions zsh-syntax-highlighting


Ah, so we're using that to determine which package manager is in use.  It might be better to just test that directly:

if [ -x /usr/bin/dnf ]
then
   dnf install


That has the added benefit that it's plain POSIX shell, not requiring Bash.

Hang on, where did that $NAME come from?  Let's look:

if [ -f /etc/os-release ]; then
    . /etc/os-release
    OS=$NAME
    VER=$VERSION_ID
elif type lsb_release &gt;/dev/null 2&gt;&amp;1; then
    OS=$(lsb_release -si)
    VER=$(lsb_release -sr)
fi


Oh dear, it looks like NAME is assigned in only one of those two paths, and we actually wanted to be using OS (or assigning to NAME and VERSION_ID in the elif branch, and getting rid of OS and VER).
This is why it's a good idea to set -u, so that you get an error when expanding an undefined variable.


echo &quot;Operating system not identified&quot;
pause


That should be echo &gt;&amp;2, since it's an error message.  What's pause?  It's certainly not a common tool, and you probably just want to exit 1 at that point anyway.

Not a big fan of copying those font files into /usr/share (that should be only for files under control of the package manager).  That's what /usr/local is for.

Why are we using scp for a local copy?  Just use plain cp and reduce the dependencies.

Many platforms have a configurable preferred terminal emulator, so use that first if it exists.  For example /usr/bin/x-terminal-emulator on Debian.

On the use of sudo and su (not sure why you feel the need to double up like that!), I'd recommend turning this the other way around, and having a script that you must be root to run, but which drops privileges for the parts where that's possible.  That's certainly better than being repeatedly asked for passwords (in many sudo configurations), which isn't something you want to be training users to do.