How to assign a priority number to “update-alternatives –config gdm3.css” in a single cmdline?

I am able to run these commands in the terminal:

$   sudo update-alternatives --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css /usr/share/gnome-shell/theme/mytheme/mytheme.css 10 $   sudo update-alternatives --config gdm3.css There are 2 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).    Selection    Path                                                    Priority   Status ------------------------------------------------------------ * 0            /usr/share/gnome-shell/theme/ubuntu.css                  10        auto mode   1            /usr/share/gnome-shell/theme/mytheme/mytheme.css         10        manual mode   2            /usr/share/gnome-shell/theme/ubuntu.css                  10        manual mode  Press <enter> to keep the current choice[*], or type selection number: 1 update-alternatives: using /usr/share/gnome-shell/theme/mytheme/mytheme.css to provide /usr/share/gnome-shell/theme/gdm3.css (gdm3.css) in manual mode 

I will put these two cmds in python3.6 subprocess.run().

The issue I have is with the second command. How do I assign /usr/share/gnome-shell/theme/mytheme/mytheme.css to be the alternative of gdm3.css in the same cmdline as sudo update-alternatives --config gdm3.css?

Also, this cmd requires a number entry to select mytheme.css. The assigned number is dependent on the assigned priority, which means the assigned number can be quite arbitrary. How do I overcome the arbitrary nature of the assigned number?

Use `update-alternatives` to provide gold, lld as alternatives for ld

I’m looking for a way to use update-alternatives to provide gold (from GCC) and lld (from the LLVM project) as alternatives for /bin/ld and /usr/bin/ld.

The problem there is, I’m facing an error that says that maximum symbolic link level was exceeded when I try to add the original executable.

Is there a way to avoid this?