chore: Simpler copr script (#1829)

This depends on https://github.com/ublue-os/main/pull/663
This commit is contained in:
Zeglius 2024-11-02 00:40:58 +01:00 committed by GitHub
parent a0d3f7462e
commit 0edc61509b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,15 +1,2 @@
#!/bin/bash
# Wrapper for 'dnf5 copr'
# Includes Workaround to append the chroot "fedora-RELEASE-ARCH"
function dnf5_wrapper() {
precmd="/usr/bin/dnf5 copr"
if [[ $* =~ copr\s+enable && $# -eq 2 ]]; then
exec $precmd enable "$2" "${3:-fedora-"$(lsb_release -sr)"-"$(uname -m)"}"
else
exec $precmd "$@"
fi
return
}
dnf5_wrapper "$@"
exec dnf copr "$@"