You are not logged in.
Hi,
I have done a little kde-service menu for repo-add and repo-remove.
So far so good, adding a package to a repo works from .desktop file without using a script.
However, removing a package is bit more tricky, since repo-remove requires just the pkgname, without version, rel and arch.
I can do it with a helper script, like this snippet:
_path=$1
_param=$2
_type=$3
_workdir=$(dirname $_path)
_fn=$(basename $_path .pkg.tar.xz)
_reponame=$(basename $_workdir)
_rn=${_fn%%-[0-9]*}
_cmd="repo-remove $_param $_reponame.$_type.tar.xz ${_rn}"
_run(){
konsole --noclose --workdir "${_workdir}" -e $SHELL -c "${_cmd}"
}
_run
Is it possible to put the trimming of the string into a single Exec line in the desktop file?
Exec=konsole --noclose --workdir "$(dirname "%u")" -e $SHELL -c "repo-remove $(basename $(dirname "%u")).db.tar.xz "$(basename "%u" .pkg.tar.xz)""
If so, how? What is the syntax to use here to add
%%-[0-9]*
to the exec line?
Last edited by artoo (2013-11-20 15:21:21)
Offline
Never mind, I ended up using a script to make multi selection possible.
https://aur.archlinux.org/packages/kde- … ement-git/
Last edited by artoo (2013-11-20 13:14:09)
Offline
Please either mark this [solved] or report it to a moderator if you'd like it deleted.
Offline