I know how move .repo file to /etc/yum.repos.d and making template for new .repo file with baseurl, but is there ability to add new repo from standard input or write .repo file content directly in config-manager?
I ask this because I want robust command to add .repo file with one line in script. config-manager can’t do this at all? Best way is echo -e "repo file content" | sudo tee /etc/yum.repos.d/example.repo?
It would require at least 2 command invocations using convoluted syntax and resulting in a weird auto-generated repo ID and file name that you might not like.
Keep in mind that modern terminals support multi-line copy-pasting just fine, while adding redundant pipes is considered bad practice.
What redudant pipes? I want one line command that can add new repo for my script and doc.
Think about, if I put sudo tee /etc/yum.repos.d/anydesk.repo << “EOF” > /dev/null to my doc, 60% of readers copy firstly that command to terminal and then the .repo file content. And altough they don’t that command is IMO complicated. After pasting interface isn’t simple and you must press ctrl+d and additionally the command write “EOF” to the end of the repo file.