Giter Club home page Giter Club logo

copr-command's Introduction

standalone copr command

This Tool is not made or supported by the Fedora Project, but aims to reproduce the dnf copr functionalities for easily adding COPRs on Fedora Atomic.

It does everything rootless (unlike dnf copr) and only requires privilege escalation using pkexec for writing the repo file. Thus is also works without sudo.

Usage: copr [OPTION] [ARGUMENT]

Options:
  enable    Add COPR repository.
  remove    Remove COPR repository after backing it up.
  list      List all COPR repositories in your repo folder.
  search    Search for a COPR repository by name (in your Browser)
  disable   Keep a repo but disable it
  enable    Make a disabled repo active
  help      Display this help text.

Arguments:
  [ARGUMENT]  Name of the COPR repository (for search) or `author/repo` (for install and remove)

Examples:
  copr enable kdesig/kde-nightly-qt6
  copr remove kdesig/kde-nightly-qt6
  copr list
  copr search uutils

Install:

wget https://raw.githubusercontent.com/trytomakeyouprivate/COPR-OSTree/main/copr -P ~/.local/bin/ &&\
chmod +x ~/.local/bin/copr

NOTE: COPR repos are version-independent, but there could be a chance they are unmaintained and thus dont support the current version. A solution like at least warning about it, or even removing them, could be useful. I did not test such a case on Fedora Atomic, and guess such a package would simply result in an rpm-ostree error.

copr-command's People

Contributors

boredsquirrel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

copr-command's Issues

add "disable"

if grep -qFx 'enabled=1' $repofile; then
   sed 's/enabled=1/enabled=0/g' $repofile > /dev/null \
   && echo "Repository $author/$reponame disabled."
elif grep -qFx 'enabled=0' $repofile; then
    echo "Repo already disabled."
else
   echo "Repo not found."
fi

Use `find` instead of `ls`

Instead of

ls /etc/yum.repos.d/ | grep COPR_

Use

find /etc/yum.repos.d/ -type f -name 'COPR_*' -printf "%f\n"

find is more reliable, as it's strictly used for finding files like in this example with additional options & it's better for further parsing the output, while classic ls is usually used to list folder content & nothing else by the ordinary user.

install to root path

/root/.local/bin does not exist, installing the command will likely need RPM packaging

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.